Box Model

This is an example of a Box Model

Margin, border, and padding as you see in the picture, are all situated around the content. You can designate the size and style of these in your style sheet.

The following is an example of how you can do this.


body {

border-style: solid;

border-color: black;

width: 50%;

background-color: blue;


p  {

width: 250px;

padding: 100px; or 10px 20px; or all four sides

border-style: solid; of border-bottom-style: solid

border-color: black;

or border: solid black 10px;(for all encompassing)

outline: 1px solid red; (around border)

margin: 30px;




About cruxstew

I'll update this when I get a chance.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s