Forum Moderators: not2easy

Message Too Old, No Replies

Prevent Floating Text

         

valegooner

10:21 pm on Jun 28, 2004 (gmt 0)

10+ Year Member



I have a simple site which i am trying to construct using <divs> in CSS rather than tables etc. I have a navigation bar on the left positioned absolutely and 120 pixels wide by 100% high. Next to that is the content section which is 100% high - but how to set its width is causing me a serious headache.

Basically, I want the content to be centered on the page - so I set the content div to 100% width but when the page is compressed (i.e. the browser window becomes small) the text floats over the navigation bar to maintain its central position, and it is this which I am trying to prevent, but can't for the life of me see how!
Thanks,
Alex

TheBlueEyz

10:54 pm on Jun 28, 2004 (gmt 0)

10+ Year Member



Try not setting the width on the content div.

Also, set a left margin on the content div equal to the width of the left content:

#content {
margin-left: 120px;
/* note how there's no width declaration */
}

See how that works