Hi. I have a table of width 420px, and i want it to stay that way. If there is a long, unbroken line of text, such as "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", the table will grow to fit that line. How can i make it so that the line is broken up into new lines, rather than forcing the table to widen? Thanks, Dan.
I maybe wrong, but I don't think you can. Not sure, but maybe floating the text inside the table element. Or absolutely positioning it within?
Tables are designed to hold positionally related data, in other words, tabular. In keeping with that, they are implemented with applied dimensions being "flexible".[1] Cells will expand if needed to contain their content.[2] Why would you have long unbroken strings? If you want the table to stay the same width, then you will have to massage the content to fit, because the table will conform to its content. cheers, gary [1] See Tables in HTML Documents [2] You could try {overflow: auto;} which will cause the td to birth a scrollbar for wide content. Not all browsers do this correctly, nor do they have to.
ok thanks for both replies. Main reason the content may be a long unbroken string, is because the data is generated dynamically, upon user input.