Jump to content

Recommended Posts

I have just completed some updates to my site and have applied a drop down menu list using pure CSS.

 

In I.E. it appears that it is forcing the main page down, and creates a gap that is the same distance that the biggest drop down list goes to.

 

Check it out here: http://www.forextradingsignalservice.com

 

Here is the CSS for the list link:

 

#top-nav {
bottom: 0px;
padding-bottom: 12px;
margin: 17px 0 40px 0;
list-style-type: none;
display: block;
font-variant: small-caps;
font-size: 85%;
float: left;
width: 100%;
position:relative;
z-index:5;
}


#top-nav li {
float: left;
position: relative;
}

/*--- #top-nav a {
display:block;
padding:5px;
color: #ffffff;
background: #000000;
text-decoration: none;
}

#top-nav a:hover {
color: #ffffff;
background:#6b0c36;
text-decoration: underline;
} ---*/


/*--- DROPDOWN ---*/

#top-nav ul {
background: #ffffff;
background: rgba(255,255,255,0); /* TRY TO MAKE INVISIBLE - KEEP THIS */
list-style:none;
position: absolute;
left: -9999px; /* THIS WILL HIDE THE DROP DOWN LIST WHEN NOT USED - KEEP THIS */
}

#top-nav ul li {
padding-top: 1px;
float: none;
}

#top-nav ul a {
white-space: nowrap;
}

#top-nav li:hover ul {
left: 0;
top: 32px;
background-color: #242424;
padding-bottom: 4px;
}


#top-nav li:hover ul a { /* The persistent hover state does however create a global style for links even before they're hovered. Here we undo these effects. */
text-decoration: none;
}

 

 

It works fine in firefox and chrome.

Link to comment
https://forums.phpfreaks.com/topic/243717-drop-down-menu-creates-mystery-gap-ie/
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.