views:

1300

answers:

2

I'm using absolute positioning and negative margins (with top: and left:) to position logos and other such things in my website. I'm aware that IE6 has problems with negative margins and absolute positioning, how can I overcome these issues to ensure they work correctly in IE6?

A: 

You may want to reconsider using negative margins. Do you really need them for what you are doing? I guess it is hard to tell without an example of your code.

If you are using absolute positioning, you can position something where-ever you like, relative to whatever relative parent element you have. The top and left properties (or right and bottom) should mean you don't have to use negative margins, shouldn't they?

thomasrutter
+1  A: 

When using absolute positioning in IE6, you might get some unexpected positioning unless you specifically set a width on your nearest positioned parent element (otherwise IE6 does not seem to know where your left value is supposed to be).

Ian Oxley