980px

1. Margins

Clears an area around the border. The margin does not have a background color, it is completely transparent:

Select Code
1
div { margin: 10px; }

See Also: CSS Margin | W3 Schools

2. Border

A border that goes around the padding and content. The border is affected by the background color of the box:

Select Code
1
div { border: 1px solid black; }

See Also: CSS Border | W3 Schools

3. Padding

Clears an area around the content. The padding is affected by the background color of the box:

Select Code
1
div { padding: 10px; }

See Also: CSS Padding | W3 Schools

 

This portion of the Premium Design Works website is written by Mike Sinkula for the Web Design & Development students at Seattle Central College and the Human Centered Design & Engineering students at the University of Washington.

Leave a Comment:

Don't forget to get your Globally Recognized Avatar.

css.php