![]() |
Need some help with image rollover change
So I'm trying to do a map, and selected regions should highlight (new image to show) on mouse rollover. Not using any js.
In the html I've got: Code:
<a id="test1" href="#"><img id="area1" src="styling/pin.png" alt="regions"></a>Code:
a#test1:hover{Edit: can't use sprites I don't think - the main image will be one of Europe, and hovering on each country should highlight it. |
Okay I got it showing the maptest image, but now it re-positions pin and maptest, how can I make pin disappear on hover? I tried visibility: hidden but that doesn't work.
I've put a test version up as I don't think I'm being clear. http://goo.gl/mgU9J - hovering on the pin icon should show the other image. |
Try this CSS:
Code:
html{padding:0px;margin:0px;}Now, if you're going for a full map of Europe and you want to have the countries highlight as your mouse enters their borders I have to warn you: this really can't be done without either 1) an enormous amount of HTML/CSS or 2) some javascript. I tried doing something similar with an aerial map of a farm/B&B and wasted quite a lot of time with image maps trying to get a working solution to highlight certain buildings or fields when their exact feature boundaries were hovered over. In the end, it was a lot of time wasted. Then again, this was pre-HTML5 and CSS3, so maybe there is a viable method these days...but I haven't seen it executed so far. I guess I'm just saying you might want to prepare yourself for the idea of resorting to at least a little javascript for this. |
Quote:
|
| All times are GMT +1. The time now is 08:31 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.