Forum Moderators: not2easy
I've got a web page with lots of thumbnail images on it. I want to make it so that when you hover over or click on the thumbnails an enlarged version of the image appears eleswhere on the page -- not replacing the thumbnail but in addition.
I used to use javascript to do this by referencing the image ID's and using a Behavior.
Does anyone know of a good method for achieving this using CSS?
Thanks everyone.
<a href="#">
<img src="small.gif" />
<span>
<img src="large.gif" />
<p>caption</p>
</span>
</a>
CSS:
a span {display:none}
a:hover span {display:block; position:...} The <a> tag is needed for IE, it doesn't do :hover on anything but <a> tags
You should find plenty of samples fully worked out on the web.
The drawback is that all large images will be loaded by the browser even if the user hover over none of them.