Hi
My website works OK in IE9, Safari, Opera and Chrome but Firefox objects to my Contacts page. The contact form position is wrong and the navigation does not work for the Contacts page. The other pages work ok. Both HTML and CSS validate ok
Hi
My website works OK in IE9, Safari, Opera and Chrome but Firefox objects to my Contacts page. The contact form position is wrong and the navigation does not work for the Contacts page. The other pages work ok. Both HTML and CSS validate ok
This thread shows a classic cross‑browser layout mismatch: a positioned element used for layout ended up sitting over the navigation and intercepting clicks in Firefox, while other engines tolerated the markup. correctly pointed to the overlapping positioned element and suggested a z‑index fix; later confirmed that removing the table-based layout removed the problem. Below are concise, practical explanations and immediate steps to prevent the same issue.
Browsers treat table layout and positioned boxes differently. Table cells are governed by the table formatting model, so properties intended for positioned boxes (top/left offsets, negative pixel hacks) can behave inconsistently when applied to table elements or their cells. When a positioned element overlays another, it captures mouse events even if it appears visually “behind” — stacking context and z‑index rules control both painting order and hit testing. Firefox (Gecko) is stricter about these rules than some other engines, so invalid or hacky CSS often breaks there first.
Quick troubleshooting checklist you can apply now:
#mainNav {
position: relative;
z-index: 9999;
} Best practices: avoid using tables for layout, stop using negative offsets as positioning hacks, scope layout CSS to component wrappers, and test with a current Firefox profile (extensions can sometimes interfere). The root cause here was layout technique, and removing the table — as did — is the correct, maintainable solution.
Jump to Post— Taywin 312From what I see on FF, your div element with ID 'content' has left value of -245px in the CSS. Where did it come from?
The table element id 'table1' has top as -500px also. As a result, your form table is hanging up there and cover the navigation link …
From what I see on FF, your div element with ID 'content' has left value of -245px in the CSS. Where did it come from?
The table element id 'table1' has top as -500px also. As a result, your form table is hanging up there and cover the navigation link (which means you can't click on the navigation link). You could always force the z-index of navigation to be high value, so that it is always on top of any elements.
When you design something like this, try to apply your CSS in its own child node. If you create CSS with both global and local and apply across the whoel page, you may get unexpected results.
Hi Taywin. The site works perfectly in all the standard browsers Every element is placed correctly. The problem is firefox. Firefox:
I found that the id for the table is not styled in the external CSS form so I have removed it. But left the code commented out. The id "content" is also not styled in the external stylesheet If I remove the id it alters the layout of the page on the other browsers.
The site is over a year old and I must have checked Firefox when I originally uploaded it. So, there has been an upgrade to firefox that has screwed up my website, or soemhow I failed to test it. The fact remains that the site is ok in IE9, Chrome, Safari and Opera.
Correction: the content ID is styled in the external sheet in #outerWrapper #contentWrapper #content.
The -245px is in that declaration block.
I have found that I was using a single table and there was a rule to add location to a table cell via the CSS. Firefox didn't regard that as valid and so ignored it. I removed the table and the site now works fine.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.