In article <sl************ *********@bowse r.marioworld>,
Ben C <sp******@spam. eggswrote:
On 2008-06-13, dorayme <do************ @optusnet.com.a uwrote:
In article <sl************ *********@bowse r.marioworld>,
Ben C <sp******@spam. eggswrote:
On 2008-06-13, dorayme <do************ @optusnet.com.a uwrote:
In article
<69************ *************** *******@8g2000h se.googlegroups .com>,
Roderik <em******@gmail .comwrote:
I was wondering if there is a good way to avoid a table but achieve
the following similar behaviour:
Two divs of equal height and undefined width next to each other with a
total width of 100%.
[...]
I slap my forehead. I was not relating what I did know about BFC to the
situation so it was good of you to catch this.
There is one downside that OP might consider if he uses the
overflow:hidden on the right div: if he has images there, or generally,
if there is any content that cannot wrap like long urls, they will be
cut off. If that is remotely likely, he can use overflow: auto instead.
Or perhaps just use auto to be safe.
There is another too that may be of interest. With either hidden or
auto, if the material on the left is not pretty short, the right will be
squeezed to be easily unusuable, see what happens in Safari or FF when
the left is given more than very few words.
In other words, one can manage to get solution to OP's problem if the
case is tightly constricted.
OP's height problem is still to be solved.
He presumably wants them both the height of the one that needs the most
height. Use a table or one of those border/background tricks depending
on whether they really need to be the same height or just to look like
they are.
To give the appearance of equal heights, OP can wrap the two divs in a
bordered element and give the right div (judging by his post, obviously
the candidate for highest) a left border. That would mimic a one row two
cell table.
More interesting to assume that OP is not wanting a table because
material is not tabular.
But nevertheless, with a table, there is a small problem that he might
want to avoid: the sort of shrink to fit he might want might need a
nowrap in the td, otherwise even a short string of words in the left
cell would wrap too soon for his taste. With two divs side by side as we
are discussing, this allows the left to be as long as the sentence up to
the width of the body element. The right will be squeezed and will be
unusable under some circumstances. But in a table, the table always
seems to go for good sense and makes the right readable without undue
tricks.
Here is a URL that might help understand what I am saying:
<http://dorayme.890m.co m/alt/sideBySide.html >
--
dorayme