how can i rollover with 2 dfferant image http://gandhidhaval.googlepages.com/rollover-1.JPG images r here http://gandhidhaval.googlepages.com/Copyof5button.gif http://gandhidhaval.googlepages.com/button-blue.gif
HTML: <ul id="nav"> <li><a href="#foo">Foo.</a></li> </ul> CSS: *{margin:0;padding:0;} ul#nav li { list-style:none; } ul#nav li a { display:block; width:100px; height:20px; background:url(http://gandhidhaval.googlepages.com/button-blue.gif) no-repeat center left;} /* CHANGE the width/height to what you need */ ul#nav li a:hover { background-image:url(http://gandhidhaval.googlepages.com/Copyof5button.gif); } You might need padding on the LI, and you should probably combine both images into one image (equal to the height of your anchor times 2) so that it doesnt flicker/stutter on hover... and just change the position but the above should do.
yes I.E. and fire fox giving me different result.. as well as no propar. how can i solve this probs......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>G</title> <style type="text/css"> @import url("css.css"); </style> </head> <body> <div id="wrapper"> <ul id="nav"> <li> <a href="#">Clothing</a> <li> <a href="#">Bedding</a> <li> <a href="#">Body Products</a> <li> <a href="#">Books</a> <li> <a href="#">Toyes</a> <li> <a href="#">Nappies</a> <li> <a href="#">Bio Paint</a> <li> <a href="#">Bathroom</a> <li> <a href="#">Furniture</a> <li> <a href="#">Stationary</a> <li> <a href="#">Bio Cleaners</a> <li> <a href="#">DVD's</a></li> </ul> </div> </html> -css------- *{margin:0;padding:0;} #wrapper { width: 1200px; height: 1000px; position: relative; background-color:#2e1e13; } ul#nav li { list-style:none; } ul#nav li a { display:block; width:100px; height:20px; background:url(http://gandhidhaval.googlepages.com/button-blue.gif) no-repeat center left;} /* CHANGE the width/height to what you need */ ul#nav li a:hover { background-image:url(http://gandhidhaval.googlepages.com/Copyof5button.gif); }