View Full Version : css menu list postion differs in IE and Firefox

12-23-2006, 08:43 PM

I have a navigation list simply styled in css. in IE the navigation stays the same on the home page as the rest of the site ie right tight to the top of the page...

however in Firefox on the home page there is a space between the top of page and the navigation. strangely the navigation is fine on any other pages so it only seems to affect the home page in firefox...

this must be due to some code in the home page as the css is the same across the website.

the site is - www.sugardaddybabes.com (http://www.sugardaddybabes.com)

if you view in both IE and firefox you will see the top nav position differs...

How can i rectify this in Firefox? anyone spot the cause?

12-24-2006, 05:42 PM
The page you gave us a link to has a <!DOCTYPE> declaration while other pages don't. Hence the first page is rendered in standards mode while other pages are rendered in quirks mode.

Apparently, in quirks mode, the <ul> element (at least in some cases) has no top margin. I couldn't resolve in which cases the <ul> element has a top margin and when it doesn't, but this is not directly related to your question. Maybe someone else can clarify this. (Edit: this applies to FF)

In your case, if this is the only problem that you are observing, to fix the problem, you could simply just remove the <!DOCTYPE> declaration causing all pages to be rendered in quirks mode.

But probably it is better go to switch to standards mode, since there might easily arise many other problems if you choose not to.