469,903 Members | 1,493 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

Divs & height

Hi guys, I got a small problem which is driving me mad.
I don't know if what I want to do is impossible or I am just overlooking
something stupid, in both cases I hope you will answer me.

I got a tableless 3 colums layout, container div is set to 100% height.
First column (id="newsbox") too is 100% height and it as 2 div inside; first
one(id="graphic"), is set with height on 350 pixel, second one (id="news")
contains an iframe.

The matter is: how can I manage to have the iframe taking all the remaing
height? If I give 100% height page became awfully long. I've tried some
hack too but with no success, and #graphic div has to be necessarily
350pixel high.
This is the page code:
<div id="newsbox">
<div id="graphic" ><img src="files/image.jpeg" width="230"
height="300"></div>
<div id="news" ><iframe src="news.php"></iframe>
</div>
</div>
This is the CSS code:
#newsbox {
height: 100%;
width: 230px;
float: left;
border: none;
margin: 0px;
padding: 0px;
}
#graphic {
margin: 0px;
padding: 0px;
border: none;
width: 230px;
clear: both;
height: 350px;
float: left;
}
#news {
width: 230px;
float: right;
margin: 0px;
padding: 0px;
height: 100%;
}

At start both image and Iframe were inside #newsbox div, with just the same
result.
Please help me.
UT
Jul 20 '05 #1
1 2297
UnderTaker wrote:
The matter is: how can I manage to have the iframe taking all the remaing
height?


Comments on your provided code:
You define the Height of the image to be 300 pixels for the image
itself, yet for the "graphic" container, you define its Height to be
350px. If you give the "graphic" also to be 300px, this should resolve
your problem regarding the iframe taking the remaining height of the column.

It seems that you have to give the Width Attribute directly to iframe.
I have no idea as to why you apply float:right to "news" if you want it
to be in the same column.

--
Gus
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Duane Lambe | last post: by
2 posts views Thread by David Winter | last post: by
roula
19 posts views Thread by roula | last post: by
18 posts views Thread by maya | last post: by
4 posts views Thread by Steffan A. Cline | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.