background preloader

Browser

Facebook Twitter

Security

Hacks. Mozilla. Internet Explorer and the CSS box model. One of the differences between Internet Explorer and standards compliant Web browsers that cause a lot of trouble for CSS beginners is the CSS box model. Since the box model is what browsers use to calculate an element’s total width and height, it is quite understandable that different browsers producing different results can be both confusing and frustrating. How the CSS box model works has been explained by others many times already. Nonetheless I still see questions related to the CSS box model on forums and mailing lists, and frequently encounter sites that expect browsers to use Internet Explorer’s non-standard way of calculating box dimensions.

That is why I have written this article, which to a large extent is a translation of an article I wrote for Swedish magazine CAP&Design earlier this year.