CSS, Divs and Column Widths -
11-08-2005
, 06:41 AM
Hi there. I am trying to make the transition from Tables to Divs and CSS and
I'm having some troubles getting started. Here is what I have so far:
http://www.petermcphee.com/divtest.html
But I find that the columns (e.g. Left Nav) don't allow the text to wrap
inside of the division. I.e. the text just flows out of the partition despite
setting the width property to a fixed width of 100px. It just blows out.
Also, I have shifted the positioning of the code in the document and played
around with Float/Clear to get the blocks where I want, which has been ok so
far, but I noticed also that the Header division is not inline with the rest of
the document even though I have set the margin to 10px for everything. The
alignment looks great in DreamWeaver, but when viewed in IE6 it falls apart a
little.
Peter,
Wrap the entire page in a container div with margin-left:10px;
Wrap leftnav and leftcontent in a div with float:left
Change leftnav, header, leftcontent to margin:10px 0px 10px 0px;
At the end of leftnav, right before the </div> put <hr
style="display:block; visibility: hidden; clear:both;" />
I have the complete html, if you want it, email me.