By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,493 Members | 1,920 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,493 IT Pros & Developers. It's quick & easy.

fixed table cells

P: n/a
JD
Hi,
I am preparing a report in HTML. I used fixed length cells by
specifying the width attribute in <td>. However for some text, the
cells doesn't stick to the size specified. The expected effect should
be that the text should wrap to the next line, but it doesn't. Can
anybody help me to get around with this problem?

Jan 24 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 2007-01-24, JD <jo**********@gmail.comwrote:
Hi,
I am preparing a report in HTML. I used fixed length cells by
specifying the width attribute in <td>. However for some text, the
cells doesn't stick to the size specified. The expected effect should
be that the text should wrap to the next line, but it doesn't. Can
anybody help me to get around with this problem?
A cell will never be narrower than the width of the longest unbreakable
sequence of characters in it.

You could experiment with table-layout: fixed, or put divs inside the
cells and set widths on the divs. Use the overflow property to specify
how you want long unbreakable sequences to overflow the divs. You can't
force word breaks other than at proper word-breaking points unless you
use IE-proprietary extensions.
Jan 24 '07 #2

P: n/a
Scripsit JD:
I used fixed length cells by
specifying the width attribute in <td>.
You shouldn't have done that. Don't even consider setting widths, unless
they become a problem.
However for some text, the
cells doesn't stick to the size specified.
That's quite possible.
The expected effect should
be that the text should wrap to the next line, but it doesn't.
You have probably done something that prevents line wrap.

I guess the error is at line 42, but can't be sure. In the absence of the
URL of your page, that's as good a guess as any other.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Jan 26 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.