dbmv
01-29-2007, 09:27 PM
I'm trying to create a page that will fit inside the browser window with a panel along the top, another along the left, and an iframe that uses the remaining space. This is exactly what I want to do: http://www.cabl.com/bar/ -- only that site is done with tables and I'm trying to do it with CSS only.
I'm a noob just learning so maybe it's too advanced for me. The closest I've gotten is:
<div style="top:0; left:0; height:40px; width:100%; z-index:3;"></div>
<iframe src="left.htm" style="position:absolute; top:0; left:0; width:150px; height:100%; padding-top:40px; z-index:2;"/>
<iframe src="main.htm" style="position:absolute; top:0; left:0; width:100%; height:100%; padding-top:40px; padding-left:150px; z-index:1;"/>
That works as far as placement but for some reason the frames are enlarged to more than width/height of the window (by exactly the amount of padding) so the window must be scrolled. I tried changing "padding-" to "margin-" and same result.
Any tips, places to look, or even a "You can't do that with CSS stupid!" woud be greatly appreciated.
I'm a noob just learning so maybe it's too advanced for me. The closest I've gotten is:
<div style="top:0; left:0; height:40px; width:100%; z-index:3;"></div>
<iframe src="left.htm" style="position:absolute; top:0; left:0; width:150px; height:100%; padding-top:40px; z-index:2;"/>
<iframe src="main.htm" style="position:absolute; top:0; left:0; width:100%; height:100%; padding-top:40px; padding-left:150px; z-index:1;"/>
That works as far as placement but for some reason the frames are enlarged to more than width/height of the window (by exactly the amount of padding) so the window must be scrolled. I tried changing "padding-" to "margin-" and same result.
Any tips, places to look, or even a "You can't do that with CSS stupid!" woud be greatly appreciated.