Here's something that works in Firefox (specifically, Firefox 1.0 and 2.0 beta 2 for Mac), but that I hope will be nicely cross browser (I don't actually have a recent copy of IE; it doesn't exist for the Mac). It's more hard-coded than I often like (I don't normally use "position: absolute;" so much), but it's the first thing that came to mind. It's based on a document with four divs, with id="head", "foot", "menu", and "content".
It sounds like you want an "iframe" - a frame that is inside one of the td elements. If you don't want the browser to get scrollbars, then that's pretty much the only way to do things.
[table] [tr] [td width="100%" colspan=2]HEADER[/td][/tr] [tr] [td width="10em"]MENU[/td] [td width="100%"][iframe with some attributes set appropriately][/td] [/tr] [tr] [td width="100%" colspan=2]FOOTER[/td][/tr] [/table]
But table-based layouts are so 20th century. :) And as I said, I know that the CSS/div-only method that I outlined gives pretty much exactly the right effect in Firefox (and the bugs with it in Safari and Opera could probably be tracked down and ironed out). If it doesn't at least come close in IE, I blame IE. :) (Not that blaming IE helps anything, mind you...)
Thanks. I'll probably try both tomorrow. I haven't really done all that much with iframes yet and forgot to consider them for this. I'll let you know how either looks, probably just in IE for now. I'll follow up with other browsers when I get some fre time, though, because this is a very common layout for map-based web things (not too surprisingly, the expanding cell will mostly contain a map) and I think it would work more smoothly if I moved away from the framed setup.
For all that Steuard's approach seems unambiguous to me, IE renders the content div at the size of its content, apparently ignoring the requested bottom, right, and overflow parts of the style. Grr.
pmb's iframe approach seems to agree with IE better, though, so I'll probably run with that.
Comments 5
#head, #foot ( ... )
Reply
[table]
[tr] [td width="100%" colspan=2]HEADER[/td][/tr]
[tr] [td width="10em"]MENU[/td] [td width="100%"][iframe with some attributes set appropriately][/td] [/tr]
[tr] [td width="100%" colspan=2]FOOTER[/td][/tr]
[/table]
Reply
Reply
Reply
pmb's iframe approach seems to agree with IE better, though, so I'll probably run with that.
Thanks for the suggestions!
Reply
Leave a comment