I've been trying to get away from using tables as a layout tool, but I've
just come across what I consider to be a serious liability.
If I specify a width (minimum, really) in a div, such as
#body {
width: 90%;
margin-left: 5%;
margin-right: 5%;
border: 1px solid navy;
padding: 10px;
}
And then I put a table in that div, when the table data gets too large, it
runs outside the box instead of the box expanding. I understand that this is
expected behavior (though IE will indeed expand the box, other browsers
implement the "correct" behavior and either cut off the content or expand it
beyond the box depending on my overflow setting). If I set the overflow to
auto, I get ugly scroll bars. I don't like it.
If I use a table instead, and put a table inside, the containing table
expands.
Is there a way to get that behavior with divs or am I out of luck on this
one?
To clarify, I want a box with a border that usually takes up 90% of the
window, but expands if the content inside is too big to fit. I could use a
table, but would like to use a div/CSS if I can.
TIA
--
--
~kaeli~
Do not taunt Happy Fun Ball!
Comment