sayedsohail Posted July 15, 2007 Share Posted July 15, 2007 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; } Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted July 15, 2007 Share Posted July 15, 2007 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! 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. Quote Link to comment Share on other sites More sharing options...
sayedsohail Posted July 15, 2007 Author Share Posted July 15, 2007 which two elements please? can you please show me where i am wrong? Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted July 15, 2007 Share Posted July 15, 2007 #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; } Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted July 15, 2007 Share Posted July 15, 2007 and shouldn't be there. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.