I am trying to achieve a very common effect on ecommerce site where you have one main picture of a product and beside it a bunch of thumbs. When you hover or click on one, it changes the image in the main picture. However, I can't find a tutorial, question on SO or other place that shows how to do it.
I have the following code to show one thumb and one picture. However, I don't know how to extend this to multiple thumbs.
HTML:
<tr>
<td colspan=2>
<p align="center"> <a class="rollover" href="detail.php">
<img src="http://womeninbiznetwork.com/wp-content/uploads/2011/07/logo-google.thumbnail.gif" name="pic" border="0"/>
<span><img src="http://www.google.com/intl/en_ALL/images/logos/images_logo_lg.gif"/></span>
</a>
</p>
</td>
</tr>
<tr>
<td>Here is text</td>
</tr>
CSS:
a.rollover {
display: block;
position: relative;
}
a.rollover span {
position: absolute;
left: -10000px;
}
a.rollover:hover span {
position: absolute;
left: 200px;
}
Thanks for any suggestions.