Jump to content

[SOLVED] position at margin-top:68px; not working in firefox?


sayedsohail

Recommended Posts

Hi everyone, I don't know if anyone had come across this issue,

 

I am trying to display my menu items at margin-top:68px, this works fine in IE but in firefox it shows slight below than in IE, this way my next css elements are getting disturbed.

 

Please help.

 

 

#menu
{
margin-top:68px;
margin-left: 0;
margin-right: 0;
margin-bottom: 40px;
border-top: 1px solid #999;
z-index: 1;
}

#menu ul
{
list-style-type: none;
text-align: center;
margin-top: -8px;
padding: 0;
position: relative;
z-index: 2;
}

Link to comment
Share on other sites

Yeah I came upon this issue zillions of times before. The two elements need to have both the property position: relative. That's what helped me get it working!  ;D

 

Oh, and firefox sucks at CSS positioning. IE is soo much better. I had to start from scratch on one of my pages because Firefox was completely messed up. IE worked fine. :o

Link to comment
Share on other sites

#menu
{
margin-top:68px;
margin-left: 0;
margin-right: 0;
margin-bottom: 40px;
[b]position: relative;[/b]
border-top: 1px solid #999;
z-index: 1;
}

#menu ul
{
list-style-type: none;
text-align: center;
margin-top: -8px;
padding: 0;
[b]position: relative;[/b]
z-index: 2;
}

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.