CSS Box Model

BOX MODEL

The CSS box model consists of 4 elements:

  1. Content
  2. Padding
  3. Borders
  4. Margins

It allows you to add a border around HTML elements and to define spaces between them.

Content – Inside this is where text and images appear

Padding – Padding is transparent, but clears an area around the content

Border – The border goes around the padding and content

Margin – This clears an area outside the border which is also transparent just like padding is

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s