I’ve got a question about creating a vertical image sprite menu.
Here’s my HTML:
<div id="menu">
<ul id="menulijst">
<li id="index"> <a href="index.html"> home </a> </li>
<li id="auteur"> <a href="auteur.html" > de auteur </a> </li>
<li id="recensies"> <a href="recensies.html"> recensies </a> </li>
<li id="siberie"> <a href="siberie.html"> siberie </a> </li>
</ul>
</div>
Here’s a picture of the menu I created in photoshop and how it looks in my site:
I’m new to creating web pages so I found this site to explain me how to make the sprite work but somehow whatever I try it doesn’t. (I have found more sites but I can’t post them here because I don’t have enough points)
My CSS:
@charset "UTF-8";
/* CSS Document */
*
{
margin: 0;
padding: 0;
}
body
{
color: rgb(0,0,0);
background-color: #ffffff;
line-height: 1.6;
font-size: 14px;
font-family: Arial, Helvetica, sans-serif;
}
div#wrapper
{
width: 790px;
background-color: #cccccc;
margin: auto;
}
div#header
{
padding: 10px 20px;
background-color: #333333;
text-align: center;
color: #ffffff;
}
div#menu
{
width: 160px;
float: left;
height: 335px;
border: 1px rgb(153,153,153);
}
#menulijst
{
float: left;
width: 160px;
height: 335px;
background-image:url(../isweb/menuknoppen.png);
position: relative;
}
#menulijst li
{
margin: 0;
padding: 0;
list-style: none;
position: absolute;
top: 0;
}
#menulijst li, #menulijst a
{
height: 200px;
display: block;
}
#index {left: 0; width: -95px;}
#auteur {left: 0; width: -75px;}
#recensies {left: 0; width: -110px;}
#siberie {left: 0; width: -117px;}
div#menu ul li
{
margin: 10px;
}
div#content
{
width: 590px;
padding: 10px 20px;
background-color: #999999;
float: right;
}
div#footer
{
clear: both;
padding: 10px 20px;
background-color: #333333;
text-align: center;
color: #ffffff;
}
div#footer ul li
{
display: inline;
margin: 10px;
}
h1
{
font-size: 16px;
text-transform: uppercase;
}
a
{
color: rgb(204,204,204);
text-transform: uppercase;
text-decoration: none;
}
p
{
margin: 10px 0px 0px 0px;
}
.zijwolf
{
float: left;
padding: 15px 15px 5px 0px;
}
li
{
list-style: none;
}
I made a menu based on the one in the first link but with my own twist (vertical, different color, etc.)
I put the darker color behind the lighter color for the hover effect explained in the first link but I can’t seem to position the links behind the right box.

It looks like you haven’t declared the on hover property and background position.
Try adding and tweaking.