Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Synch two heights
July 12, 2006, 8:39 pm
rate this thread
I am having trouble big times figuring out a way of forcing a DIV to be
in synch with another DIV's height in a (mostly vertically) fluid
layout in a web app context. The first one has overflow-x:auto; and a
width set but not a height as I want it to vertically grow with the
Basically I would like the same height for the second one. I care less
work on both IE6 & FF1.5.
changes and the heights go out of sync. I found little information on
how to handle this case.
A second question, not directly related to what I said so far is about
Is there any way of enforcing overflow:auto in IE without having to
specify exactly width/height - e.g. use the parents height
(width:100%)? This would fix all my problems including the one from my
Here's a stripped down version of my code: (it's for a virtual grid
where the the vertical scrolling is faked and the content of the
control gets replaced real-time)
<div class="nowrap" style="text-align:right">Row3</div>
Re: Synch two heights
I hate to say it, but you could try using a table rather than div's. A table
with one row and two columns will automatically have both cells the same
height. Of course if you want both to be the same height and yet one under
the other then tables won't help.