dschmierer
11-08-2006, 08:28 PM
I am trying to create a 2 column webpage with a content panel on the left (liquid) and nav panel on the right (fixed width). In the content panel I would like to place an <iframe> element that also resizes according to screen size / browser size (i.e. is liquid). I'm using divs and CSS to control the layout and not tables but the <iframe> behavior confounds me.
I have floated the nav div on the right:
div#nav {float:right; width:256px;}
I have placed a right margin on the content div:
div#content {margin-right:256px;}
I have played around with the <iframe> within the content div, but can't get anything to work:
If I set the <iframe> width to 100% then I get the correct liquid behavior but the <iframe> extends over the whole width of the screen not allowing for the nav column on the right. If I set width to 100% and add margin-right:256px then the margin pops out 256px to the right rather than pushing the <iframe> in by 256px (this is in IE6). If I add padding-right:256px the right pops out as well and my content div pops out to 100% width.
Any suggestions? Is <iframe> compatible with CSS or should I throw in the towel and use tables?
Thanks,
Dave
I have floated the nav div on the right:
div#nav {float:right; width:256px;}
I have placed a right margin on the content div:
div#content {margin-right:256px;}
I have played around with the <iframe> within the content div, but can't get anything to work:
If I set the <iframe> width to 100% then I get the correct liquid behavior but the <iframe> extends over the whole width of the screen not allowing for the nav column on the right. If I set width to 100% and add margin-right:256px then the margin pops out 256px to the right rather than pushing the <iframe> in by 256px (this is in IE6). If I add padding-right:256px the right pops out as well and my content div pops out to 100% width.
Any suggestions? Is <iframe> compatible with CSS or should I throw in the towel and use tables?
Thanks,
Dave