Posted by Brian Cryer on 07/13/06 13:14
<sfeher@gmail.com> wrote in message
news:1152736762.264617.200390@b28g2000cwb.googlegroups.com...
> Hi All,
>
> 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
> text inside.
>
> Basically I would like the same height for the second one. I care less
> if it is CSS, tables or Javascript but I would prefer the solution to
> work on both IE6 & FF1.5.
>
> Trying to fix the height with Javascript works ok except when font size
> changes and the heights go out of sync. I found little information on
> how to handle this case.
> http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/f07f6399fb821607/d9a3a8e3e2ef47d0?lnk=st&q=onresize+change+font+size&rnum=2&hl=en#d9a3a8e3e2ef47d0
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.
--
Brian Cryer
www.cryer.co.uk/brian
Navigation:
[Reply to this message]
|