This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > June 2004 > Putting iframes in adjacent columns





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Putting iframes in adjacent columns
NullBock

2004-06-21, 12:15 pm

Hey,

so I'm trying to put two iframes on a page adjacent to each other.
here's my code :

<html>
<head><style type="text/css">
body {
margin: 0;
}
#leftContent {
position: absolute; margin: 0; width: 200px; height: 100%;
}
#rightContent {
position: absolute; margin-left: 200px; width: 800; height: 100%;
}
</style></head>
<body>
<iframe src="left.htm" id="leftContent"/>
<iframe src="right.htm" id="rightContent"/>
</body>
</html>

You can check it out here : http://springbock.com/test.htm

It works fine in IE, but netscape swallows the right frame. Any ideas
why, and how I could solve this?
Johannes Koch

2004-06-21, 12:15 pm

NullBock wrote:
> #rightContent {
> position: absolute; margin-left: 200px; width: 800; height: 100%;
> It works fine in IE, but netscape swallows the right frame. Any ideas
> why, and how I could solve this?


If you had validated your CSS code, you would have found that the CSS is
not valid ("width: 800" lacks a unit).
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Steve Pugh

2004-06-21, 12:15 pm

bounce@springbock.com (NullBock) wrote:

>so I'm trying to put two iframes on a page adjacent to each other.
>here's my code :
>
><html>
><head><style type="text/css">
> body {
> margin: 0;
> }
> #leftContent {
> position: absolute; margin: 0; width: 200px; height: 100%;
> }
> #rightContent {
> position: absolute; margin-left: 200px; width: 800; height: 100%;
> }


First fix the syntax error in your CSS. How wide should the second
ifarme be? 800. 800 what? Units are required for all non-zero lengths.

></style></head>
><body>
> <iframe src="left.htm" id="leftContent"/>
> <iframe src="right.htm" id="rightContent"/>
></body>
></html>
>
>You can check it out here : http://springbock.com/test.htm
>
>It works fine in IE, but netscape swallows the right frame. Any ideas
>why, and how I could solve this?


You're using XHTML syntax <foo/> but you're not advertising the
document as being XHTML. Also the short <foo/> is only recommended for
elements that are empty by nature (e.g. <hr>,<img> etc.). Iframes are
not empty as you should include content to be rendered when the ifarme
can not be. So the full <iframe>content</iframe> should be used.

Making thsese changes I see that it works fine in Mozilla 1.6

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <steve@pugh.net> <http://steve.pugh.net/>
NullBock

2004-06-22, 12:16 pm

Thanks!
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews