<< Back to main menu

Static positioning

The <div> tags are inserted on the page one after another. This will make each <div> appear beneath the previous one. This is the default positioning of div tags and is referred to as static positioning.

A positioning attribute does not need to be specified in the CSS to achieve this layout.

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

#div_2 {
background-color: #FC0;
padding: 10px;
width: 500px;
}
#div_3 {
background-color: #999;
padding: 10px;
width: 500px;
}