Left Division
Beginners
There are few simple rules that you can follow to make structuring pages with the division tag a little simpler. These rules apply when you are trying to place 2 or more divisions horizontally adjacent to each other on the same page.
Be sure to use this doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Nest the adjacent divisions within a container division.
<div id="container">
<div id="left"></div>
<div id="right"></div>
</div>
Right Division
Beginners
- Don't place borders on adjacent divisions.
- Don't set margins or padding for adjacent divisions.
- Set padding and margins for elements inside the division.
- Use absolute width and height settings.
- To equalize columns use absolute height settings.
#container {
margin-left: auto;
margin-right: auto;
width: 900px;
height: 500px
}
|
#left {
float : left;
width :450px;
height:500px;
background-color :#BFBFBF
}
|
#right {
float : left;
width :450px;
height:500px;
background-color :#dfdfdf
}
|
|