|
How_to_Create_Columns_with_Divs
| How to Create Columns with Divs
When we at Ecommerce Partners
(http://www.ecommercepartners.net) started using div’s rather
than table for web page layout, the most daunting experience for
me was how to create columns using div’s. So, here is the
solution for all those website developers who are struggling to
use div’s for web page layout.
The div tag can be defined as the division in a web page. It is
a block level element. This implies that the default behavior of
div’s is to stack up one above the other. This serves the
purpose of using div’s for a simple web page layout where all
the elements stack one above the other. When we have a columnar
web page layout (which happens to be the most common layout for
majority of the websites), we need to know how to use div’s to
create two or more columns in a web page.
The following method will cause div’s to stack up side by side
rather than one above the other.
Let’s say that we have two div’s: {div id=“div1”}{/div} {div
id=“div2”}{/div} (in order to display it right on a browser "{"
has been used in place of "
|
|
| |
| |