<< Back to main menu

Margin

In this layout, #div_2 has a margin value applied top and left. This has moved it in relation to its original position in the layout. Note that as a result, #div_3 has been pushed down the page.

#div_1 {
background-color: #CCC;
padding: 10px;
width: 500px;
}

#div_2 {
background-color: #FC0;
padding: 10px;
width: 500px;
margin-top: 20px;
margin-left: 50px;
}
#div_3 {
background-color: #999;
padding: 10px;
width: 500px;
}