Spans and hover?

liunx

Guest
so heres some CSS<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->div.folderview-art span{<br />background-color:#d5e4df;<br />}<!--c2--></div><!--ec2--><br /><br />My question is can i make a hover state for it even though its NOT a link?<!--content-->
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->div.folderview-art span:hover {<br />background-color:#d5e4df;<br />}<!--c2--></div><!--ec2--><br /><br />...should do it, although IE is a bit flaky with :hover so try it.<br /><!--content-->
@bluedreamer : IE6><img src='http://www.webdesignerforum.co.uk/style_images/1/post_snapback.gif' alt='*' border='0' /></div><div class='quotemain'><!--quotec-->Howe about actually making is link, setting the cursor to arrow and ignoring the href section of the a tag so your left with...<br /><br /><br />CSS<br />div.folderview-art a:hover {<br />background-color:#d5e4df;<br />cursor: arrow<br />}<br /><br />HTML<br /><a>Hover to chnage my background color, I love it.</a><!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />Apart from being bad semantic, it might not work unless you put a href=http://www.webdesignerforum.co.uk/lofiversion/index.php/"#" in it. Some browsers will ignore non linking links.<!--content-->
 
Top