Click here to get back home

fixed table cells

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
fixed table cells JD 01-23-2007
`--> Re: fixed table cells Jukka K. Korpel...01-26-2007
Posted by JD on January 23, 2007, 11:40 pm
Please log in for more thread options


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?


Posted by Ben C on January 24, 2007, 5:18 am
Please log in for more thread options


> 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.

Posted by Jukka K. Korpela on January 26, 2007, 11:11 am
Please log in for more thread options


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/


Similar ThreadsPosted
Optimized table with fixed size cells? February 4, 2007, 5:17 pm
img table cells next to each other without a gap possible? May 26, 2006, 10:27 pm
Table cells change size March 1, 2005, 9:02 pm
Table with 100% width but relative cells? June 1, 2005, 11:08 am
DIVs inside table cells? April 13, 2008, 9:46 am
Freezing the width of TABLE cells June 20, 2008, 1:12 pm
Newbie: Problems with table cells & colspan August 9, 2004, 7:11 pm
There is no gap between cells in html table with CELLSPACING greater than zero August 25, 2004, 11:38 am
how to properly hide/show table cells? January 31, 2008, 5:38 pm
HT make table data cells equal in width? May 9, 2007, 9:00 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap