html - Hover with Image Alpha Array -


i need row of links, each in parallelogram shaped box. i'm using divs way. need each box alternately black/white. want each box have unique hover colour.

<div id="bar2">     <ol>         <script type="text/javascript">             (var = 0; < 5; i++)             {                 document.write("<a href='");                 document.write(chaplink[i]);                 document.write("'><li id='li" + + "' style='background-color:" + chapcol1[i] + "; color:" + chapcol2[i] + "'>");                 document.write(chapter[i]);                 document.write("</li></a>");                  document.write("<img src='paragram");                 document.write(i+1);                 document.write(".png'>");             };         </script>     </ol>    var chapcol1 = new array(); chapcol1[0] = 'white'; chapcol1[1] = 'black'; chapcol1[2] = 'white'; chapcol1[3] = 'black'; chapcol1[4] = 'white'; 

the array works filling in of each shape but, unsurprisingly, doesn't cover entirely. has led me assumption i'll need use sequence of images, 1 every combination of colours resulting hover.

thanks in advance - hope question clear, harry

ok, let me try answer feature: parallelogram-shaped box: if understand well, want alternating blocks of black , white , want text color inside these blocks unique. don't understand why try insert image after closed <li>. guess trying insert parallelogram shape block, right? if want <li> shaped according png image, suggest use backgorund image of block, rather inserting afterward. that, write background-image: your_path/your_image.png; inside style attribute of block. might need adjust size of block, since image may "cut". adjusting size, justo following: if, instance, suppose image has width 10 pixels , height 20 pixels, , want block have same size image. write following on block's style attribute: width:10px;height:20px; anyways, i'm still thinking didn't understand want do. last comment saying no able fill entire shape: because li tag has default margin value, , background-color has no effect on margin.

for hover color, add following divs: onmouseover='this.style.color="unique_color_here";' onmouseout='this.style.color="standard_color_here";'

hope helps. if better explain want great :d try explain images have exactly, , want them.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -