Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is a CSS Box Model?

0
Posted

What is a CSS Box Model?

0

The box model *is* traditional CSS 🙂 The only reason it’s referred to like that is because Internet Explorer has it’s own version (making life a misery for web designers and programmers). The traditional and internet explorer box model both define a box as having from the inside out: 1) A content area 2) Padding 3) Border 4) Margin You specify this with the following declarations for example: width: 100px; height: 100px; padding: 10px; border: 2px solid black; margin: 5px; However this will give different results for internet explorer than to other browsers. With Internet explorer, the height and width include the padding and border. However, in the W3C standard box model, the values of padding and border are in addition to the height and width specified. I know you said you didn’t want a link, but I think this one is very good – check out the diagram on the right and you’ll see *exactly* what I mean 🙂

-->

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123