The Box Model

An example:

The CSS rules for this paragraph look like this:

background-color: #0000ff;
margin: 30px 10 px 10 px 0;
padding: 50px;
border: 50px dotted #00ff99;

The class is applied by wrapping the content in a paragraph tag like this <p class="box-model-demo">

The box model - a diagram from adactio.com

Valid XHTML 1.0 Strict

Valid CSS!

Click a button to check validation.