Forum Moderators: not2easy
If the element is abs.pos relative to a rel.pos box, the 20px could be coming from a default IE margin or padding on the relatively positioned parent element.
Try zeroing out the margins and padding on the parent. Otherwise, how about posting some code for us to see?
cEM
* {padding:0;margin:0}
.* {padding:0;margin:0}
Here's the div's CSS:
div.main {position:absolute;margin-top:2em;top:200;left:170;right:170}
jetboy_70 -
Is that space after the colon and explicit "px" necessary? I never use either of those.
kaled -
That sounds very likely to me. I don't use a doctype at all. How can I get it into quirks mode?
[htmlhelp.com...]
[msdn.microsoft.com...]
The doctype must be placed at the top of the page BEFORE the first tag.
Kaled.
Your best bet is to run your page through the HTML validator [validator.w3.org] and CSS validator [jigsaw.w3.org] first: in that way, you are removing a large number of the possible problems you might encounter. If your markup is not valid, you are dependent on the individual browsers' error-handling - and that error-handling can vary widely between different browsers because there is no standard way of dealing with invalid markup.
As mentioned by others, your problem is probably related to the fact that there is a permanent scrollbar in IE, but not in Firefox.