Container div for Organization

The <div> command is a very useful tool for organizing html pages, and the idea of a “container” div is a good idea to keep the page as a whole organized.

Just nested within the <body> </body> tags place a <div> </div> distinction.

Depending on your styling type, you may want to specify the div.

In this example, I labeled it “container”

Within the styling, a height and a width of that container div should be established, as height:xx; width:xx; (the size can be in either em or px)

Then, the nested tags can be sized accordingly (the nested tags heights and widths should add up to the container tag’s size.

This will prevent internal divs from being randomly placed or floating around in the body of the page.



~ by johnmcala on February 14, 2011.

%d bloggers like this: