Box Model and IE
Posted: Sat Jun 20, 2009 8:13 am
According to this wikipedia article...
http://en.wikipedia.org/wiki/Internet_E ... _model_bug
...IE6 and later browsers do not exhibit the box model bug if I use XHTML Strict or XHTML Transitional with a proper declaration for that, correct? Plus, the page must validate, I would imagine, in order to not generate rendering errors against its doc type.
And, it says that prior to IE6, there is no way to stop the bug, correct?
///
In the end, this is interesting because I had not read up enough on the box model -- I just sort of knew it by other means. I knew in FF when I apply settings on a DIV (as a box), that the margin property falls outside it, the border falls outside it, and the padding falls inside it. However, that said, the interesting thing is that the width is affected by the padding as a subtractor. So, if I have a box that I want to be 50 pixels wide, in W3C compliant box model mode, a given browser should compute width by the content inside the padding number, inside the border, and inside the margin. So, if I have a 10px padding in the box, then its width just increased by 20px, although its border is now 10px away on any given side. (Hopefully someone can correct me here if I'm wrong.)
http://en.wikipedia.org/wiki/Internet_E ... _model_bug
...IE6 and later browsers do not exhibit the box model bug if I use XHTML Strict or XHTML Transitional with a proper declaration for that, correct? Plus, the page must validate, I would imagine, in order to not generate rendering errors against its doc type.
And, it says that prior to IE6, there is no way to stop the bug, correct?
///
In the end, this is interesting because I had not read up enough on the box model -- I just sort of knew it by other means. I knew in FF when I apply settings on a DIV (as a box), that the margin property falls outside it, the border falls outside it, and the padding falls inside it. However, that said, the interesting thing is that the width is affected by the padding as a subtractor. So, if I have a box that I want to be 50 pixels wide, in W3C compliant box model mode, a given browser should compute width by the content inside the padding number, inside the border, and inside the margin. So, if I have a 10px padding in the box, then its width just increased by 20px, although its border is now 10px away on any given side. (Hopefully someone can correct me here if I'm wrong.)