Thursday, 20 November 2008

css automatic expanding holder div

finally found a reliable solution for the expanding main div in css layout, add the following line to the main Content div css...

overflow:auto;

then had a strange effect in Explorer where links would wrap when a pop-up menu disappeared. After another search and stripping the page apart (again!), solution is to add a footer div at the very end of the main contaier (the thing described above) and add this to the css...

#mainFooter {
clear: both;
}


Whilst I'm here - to centralise the content and still allow absolute positioning of layers, I used this one as the 'master' div tag:

div style="margin: 10px auto; background:#EEEEEE; position: relative; width: 930px;"