Web Hosting Talk







View Full Version : text overfow pushing table


ilyash
11-06-2008, 09:45 PM
Hi, I have a table and the contents inside push the width so far that it pops out of the design
How can I properly prevent this in FF & IE & Safari [etc]
If I do table-layout:fixed, the table stays the right size, but The text overflows from 1 td to other
if i do overflow: hidden
then the text is gone, but the problem is this
say my text is "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
i only see aaaaaa
but if my text is "i like to go to the beach with girls"
i see "i like to go"
I want it to go to new line like it normally would
thanks

larwilliams
11-06-2008, 10:10 PM
Hi, I have a table and the contents inside push the width so far that it pops out of the design
How can I properly prevent this in FF & IE & Safari [etc]
If I do table-layout:fixed, the table stays the right size, but The text overflows from 1 td to other
if i do overflow: hidden
then the text is gone, but the problem is this
say my text is "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
i only see aaaaaa
but if my text is "i like to go to the beach with girls"
i see "i like to go"
I want it to go to new line like it normally would
thanks
I assume this is being done with a div? Because the default behaviour of a td is to expand (usually in height) to accommodate content.
Here's how it normally works for a td:
1) If no width or height is defined, it expands by width and height to fit the content.
2) If a width is set, it expands downward to fit the content (unless there is a media contained inside the td that is wider and forces the browser to expand the width as well).
Good luck :)

ilyash
11-06-2008, 11:21 PM
beautiful.
thanks worked like a charm
i just set the width of each td
and then put a div inside
<td><div></div></td>
and for the div i did overflow: hidden
thanks again