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;
}

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

#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;
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.