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; } Link to comment https://forums.phpfreaks.com/topic/60060-solved-position-at-margin-top68px-not-working-in-firefox/ 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. Link to comment https://forums.phpfreaks.com/topic/60060-solved-position-at-margin-top68px-not-working-in-firefox/#findComment-298888 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? Link to comment https://forums.phpfreaks.com/topic/60060-solved-position-at-margin-top68px-not-working-in-firefox/#findComment-298936 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; } Link to comment https://forums.phpfreaks.com/topic/60060-solved-position-at-margin-top68px-not-working-in-firefox/#findComment-299093 Share on other sites More sharing options...
TheFilmGod Posted July 15, 2007 Share Posted July 15, 2007 and shouldn't be there. Link to comment https://forums.phpfreaks.com/topic/60060-solved-position-at-margin-top68px-not-working-in-firefox/#findComment-299094 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.