box model

D

David Graham

Hi
Could you please confirm or refute the following:

IE6 - (correctly) adds the width of margin, border and padding to the
content width so the box width is bigger tan the content width.

IE5.5 (incorrectly) - includes the margin, border and padding in the content
width, so the content width and the box width are the same.

IE5.0 - same as IE5.5

thanks
David
 
D

David Dorward

David said:
IE6 - (correctly) adds the width of margin, border and padding to the
content width so the box width is bigger tan the content width.

Yes... IF placed in to Standards mode using DOCTYPE switching. Otherwise it
acts like 5.5
IE5.5 (incorrectly) - includes the margin, border and padding in the
content width, so the content width and the box width are the same.

Err - just the border and padding I think.
IE5.0 - same as IE5.5

Yes
 
D

DU

David said:
Hi
Could you please confirm or refute the following:

IE6 - (correctly) adds the width of margin, border and padding to the
content width so the box width is bigger tan the content width.

No. I would say you misword this.
MSIE 6 for Windows will NOT include padding in the content width if in
standards compliant rendering mode (which can be triggered if you use a
full doctype declaration, with a system ID - a full valid url).
IE5.5 (incorrectly) - includes the margin, border and padding in the content
width, so the content width and the box width are the same.

No.
MSIE 5.x and MSIE 6 for Windows in backward-compatible rendering mode
will include padding in the content width.

This image comes from MSDN and illustrate the issue very well:

http://msdn.microsoft.com/library/en-us/dnie60/html/boxdim.gif

http://msdn.microsoft.com/library/en-us/dnie60/html/cssenhancements.asp?frame=true

Fix the box instead of thinking outside of it:
http://msdn.microsoft.com/library/e...cements.asp?frame=true#cssenhancements_topic3

There are a lot of websites covering this issue, with given ways to
code, hack around this annoying major bug.

DU
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,075
Messages
2,570,562
Members
47,198
Latest member
MariD92844

Latest Threads

Top