Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Make on element’s length follow another? Re: Make on element’s length follow another?

#56542
chazzwick
Member

Basically, wrap menu and content in another div. Ive called it #page-wrap. Position this relatively.
For the menu div and the container div, position them absolutely. This is what I did:

Code:
#page-wrap {width:960px;margin:20px auto; background: #daede9;position:relative;min-height:520px}
#main {position:absolute;margin:0 220px 0 10px; top:70px;bottom:10px;background: #bbca45;}
#sidebar {position:absolute;width:180px;right:10px;top:70px;bottom:10px; background: #ae6561;}

Have a look at http://charles-harvey.co.uk/examples/niceLayout/. Should explain better if you look at the code and see how its done