Back to Top
The nuts and bolts for
Creative web development

Layer position is off in IE on Mac

Question

In Internet Explorer on the Mac, my anchored (menu) layers are about 10px off. They display 10px too far to the right and/or 10px too far down.

I have specified 0px page margins using a CSS declaration for the BODY tag.

Everything seems fine in other Mac browsers and on PC. What's happening?

Answer

This is a bug in IE on Mac.

When you specify 0px margins using CSS, then IE-Mac displays the page without margins allright, but its JavaScript engine still answers with a margin value of 10px when it is asked what the page margin settings are.

So Layer Genie asks IE "What is the margin for this page?" and it gets "Left and top margins are both 10px" as an answer, while this is in fact not true.

You can work around this IE-Mac bug by explicitly setting the margins to 0 (zero) on the BODY tag:

<body leftmargin="0" topmargin="0" ....>

If you're using MX2004 then you will need to do this manually, because MX2004 always uses CSS declarations for margin settings, while you need the 'old' HTML way of doing things here.

Marja Ribbers-de Vroed

Marja Ribbers-de VroedWell, what's there to tell?

I worked as a software engineer for a well-known Dutch software company for about 10 years. But then I decided I did not want to work there anymore.
Since then, I've been working with my husband in our own company.

I "discovered" web development early 2000, and I soon found out that I could actually create my own extra (DHTML) features in Dreamweaver by building custom extensions.
My first extension was Cross-browser AutoScroller, but I've developed several other ones since then.

See All Postings From Marja Ribbers-de Vroed >>

Share this Article