Borders, Padding and Margins

Body

The body of this page should have a background color of #fffdd0, utilize the font family sans-serif, and have margins all around of 12 pixels.

Basic Border

This box should have a 2px dashed red border all the way to the margins with min ht of 30px

Types of Borders

This box should have a min ht of 100px, width of 300px, border width of 10px, left border dashed and red, rt dotted blk, top double prple, bot groove orange

Cell Padding Example

This box helps you see clearly how padding affects placement. The box itself takes up space fromtop bot left rght. Cell padding affects the space between the box border and the text within. This box should have 5px green bdr with pad left 10px, 50px rt, 20 top 100 bot.

Margin Example

This box helps you see clearly how margins affect placement. There is no cell padding so the text is right up against the border, but the entire box is pushed away from the side of the page and other elements. Margins should be 20px, 100px, 200px, 50px.

Floats and Clears

No Float

test pic

In this test image should be in upper left with no cell padding and the text is right below it. Border 2px solid blue, height 300px width 500px.

Float Left

test pic

In this test image should be in upper left with no cell padding and the text is right below it. Border 2px solid blue, height 300px width 500px.

Float Right

test pic

In this test image should be in upper left with no cell padding and the text is right below it. Border 2px solid blue, height 300px width 500px.