Brett Parker wrote:
On 15 Feb 17:07, Mark Rogers wrote:
On 15/02/10 15:11, Brett Parker wrote:
Usual method round that is to float menu to left, content to right, wrap them in a containing div, and have one more div in there that is basically just a clear: both; so that the footer kicks in in the right place (though, you can just make that div the footer and have done with it :)
Thanks for confirming what I thought!
I went looking at the code causing a problem and found all sorts of bodges in the CSS, which having stripped most of them out I did make everything work.
One problem seems still to be that I have to fix the MENU and CONTENT widths. Otherwise, if the CONTENT pane is fixed width as a result of its content (eg if it comprises only a fixed width table) the entire CONTENT "pane" floats to the right hand edge of the layout, leaving an ugly gap between the MENU and CONTENT panes. Although that could also be something else wrong in the code I'm looking at.
I tend to stick to percentage widths, fixed width layouts are generally a bad idea anyways ;)
Indeed, although in this scenario a combination would not be out of the question. For instance:
Set the outer container width to, e.g. 80%, then within this float-right your menu with some fixed width (which is not unreasonable for a menu). Then, follow with a content div with no width set. Divs are naturally fill-to-fit, and so this should fill up whatever space is left between the left edge of the outer container and the menu (subject to margins/padding), meaning your layout should adapt to almost any screen size (apart from /very/ tiny, whereupon the fixed menu will overwhelm the elastic content div).
Simon