HTML Code | CSS Code |
---|---|
<div id="gallery"> <ul> <li> <a href="photo1.jpg"> <img src="photo1thumb.jpg"> <span> <img src="photo1.jpg"> <br>Golden Gate Bridge </span> </a> </li> ..... </ul> </div> |
#gallery { position: relative; } #gallery ul { list-style-type: none; width: 300px; } #gallery li { display: inline; float: left; padding: 10px; } #gallery img { border-style: none; } #gallery a { text-decoration: none; font-style: italic; color: #333; } #gallery span { display: none; } #gallery a:hover span { display: block; position: absolute; top: 10px; left: 300px; text-align: center; } |