Jump to content

hover and z-index


fierdor

Recommended Posts

I have a horizontal menu with background images for the anchor elements.

On hover I am changing my background image which is slightly more than the size of the image in the static state..

So I want this image to be on top...

However the code does not seem to work..

My hover image appears but the extra part remains hidden behind the adjacent anchor's image..

 

 

#navmenu ul li a{	
background-image:url(../images/1.gif);
background-repeat:no-repeat;
text-decoration:none;
outline:none;
color:#000;
float:left;
margin-right:-18px;
width:100px;
display:block;
text-align:center;
padding:6px 11px;
display: inline;
font-size:12px;
text-indent:-8px;
}
#navmenu ul li a:hover{
background-image:url(../images/2.gif);
color:#fff;
z-index:6000;
}

 

<div id="navmenu">
<ul>
<li><a  href="index.php">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a  href="#">4</a>
<li><a  href="#">5</a>
</ul>
</div>

 

Is it like z-index wont apply to hover state?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.