Hello, I've implemented a menu that changes its view when user hovers his mouse <img border='0' alt='' src='images/1.png' onmouseover="this.src='images/2.png'" onmouseout="this.src='images/1.png'" /> Is it possible to implement it without JavaScript? For example with CSS Thanks
Here in source code -> tipsters blogs it is easy. Look at the pictures -> http://obstawia.pl/wp-content/themes/home/images/zaloz-bloga.jpg Some css and special pictures for Your menu and all will be works.
you can use CSS/Stylesheet without JavaScript /* ======================================= */ /* Boxed Class */ .boxed a { display: block; background: url(images/arrow.gif) no-repeat left center; text-decoration: none; overflow: hidden; } .boxed a:hover { display: block; background: url(images/arrow_hover.gif) no-repeat left center; text-decoration: none; overflow: hidden; } /* ============================= */ <div id="linktest" class="boxed"> your links </div>
yes, this site use javascript but this image replace not: a.zaloz-bloga:hover { [B]background-position:0 -175px;[/B] } a.zaloz-bloga { background:transparent url(images/zaloz-bloga.jpg) no-repeat 0 0; float:left; height:175px; margin:20px 22px 0 32px; width:154px; } Code (markup): for a elements with class zaloz-bloga <a class="zaloz-bloga" .... background will be moved in vertical (smart effect on one picture), but Wachiraj method is good too.
My preferred way of doing this: #image{ background: images/1.png } #image:hover{ background: images/2.png } Code (markup): Simply put, all you do is make a <div> or something with the id="image", after that, you just make the background anything you want it to be. Easy. sample: <html> <head></head> <body> <div id="image"> stuff? </div> </body> </html> Code (markup):