Forum Moderators: not2easy
HTML
<ul>
<li><a href="#">Word 1<img src="image1.jpg" alt="" ></a></li>
<li><a href="#">Word 2<img src="image2.jpg" alt=""></a></li>
<li><a href="#">Word 3<img src="image3.jpg" alt=""></a></li>
</ul>
CSS
ul {
list-style-type:none;
padding:0;
/*The dimensions of the images */
height:500px;
width:500px;
background-image:url(image.jpg);
/*make the menu relative so the images take their position from here*/
position:relative;
/*explicitly setting z-index allows you to control the value for the child elements so you can display the image above the default background, but behind the link */
z-index:1;
}
li {
padding:0;
}
a {
/* style the links */
width:45%;
margin:1em;
padding:1em;
display:block;
background-color:#ddd;
}
a img {
/* hide the image until a hover - */
visibility:hidden;
/* make it small so it takes up no space */
height:0;
width:0;
/*set the position for when it is hovered */
position:absolute;
top:0;
left:0;
}
/* style the link on hover */
a:hover {
background-color:#eee
}
/* make the image visible on hover */
a:hover img {
height:500px;
width:500px;
z-index:-1;
visibility:visible;
}