View Full Version : IE's and mozilla's box-model
Ok, one simple question: Does IE6 and mozilla have the same box-model?
I've read that if you include "<?xml..." IE will have the sloppy box-model, but I don't have that and I still got problems to make it look the same in both browsers.
<font face="Courier New">-- David</font id="Courier New">
correct me if i'm wrong butif you do doctype strict then it behaves poperly otherwise it is sloppy mode.
or it may be the otherway round...
<font color="green">Alan</font id="green">
Brian Nickel
31.10.2002, 11:21
If you have any W3C doctype, it will act struct in both browsers, otherwise both use the IE5 model.
In IE, if you use <?xml, it will send it into IE5 mode, so you need to use a meta or http for encoding.
<font face='Courier New'><font color=brown>>++++++++[<++++++++>-]<++.>++++++[<++++++++>-]<.[>+>+<<-]>---------.--------.>----.</font id=brown></font id='Courier New'>
mad hatter
31.10.2002, 12:21
I can't wait till we can use the IE box model.
- D.S.
< [url="http://www.stilleye.com"]stilleye[/url:4r63ohlfhk] | [url="http://www.stilleye.com/scripts/marginfix"]IE Margin Fix[/url:4r63ohlfhk] >
webarnes
31.10.2002, 22:06
:oops: ie box model?
I'm confused; maybe I misunderstood the box model.
I was under the influence the following example was the problem with the difference between ie and moz / netscape box model?
width: 50px;
border: 2px;
padding-left: 10px;
50 width
+2 border left
+2 border right
+10 padding left
Moz / Netscape: 64px wide.
ie: 50px wide.
It is very likely I am wrong and need to read some more about it.
However,
If this is example is correct I would take moz / netscape any day.
What the math adds up to is what will get displayed.
:mrgreen:No unexplained phenomena....
The mystery of the disappearing numbers.
William
Mozilla uses the strict box model (true_width = width + margin + border) while IE6 in non-standards mode still uses the IE box model (true_width = width). To make IE6 comply with the CSS model (the one Mozilla uses) you have to put it in strict mode using the HTML 4.01 STRICT doctype. So you are right, William ;)
Brian Nickel
31.10.2002, 22:53
http://webfx.eae.net/dhtml/boxsizing/boxsizing.html has an explanation/remidy for cross-browser confusion.
<font face='Courier New'><font color=brown>>++++++++[<++++++++>-]<++.>++++++[<++++++++>-]<.[>+>+<<-]>---------.--------.>----.</font id=brown></font id='Courier New'>
vBulletin® v3.6.7, Copyright ©2000-2008, Jelsoft Enterprises Ltd.