homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

width of cell in table

 1:03 pm on Sep 5, 2001 (gmt 0)

Hi all,
i would like to know how to prevent the cell width from increasing as its content also increases.(i mean when the content is a single word with more characters). i used the property of nowrap which works only for multiple words



 1:43 pm on Sep 5, 2001 (gmt 0)


I would go about setting the <td> tag to a specified pixel width. An example would be...


This way the cell is restricted to a certain pixel setting for width of the cell.



 2:37 am on Sep 6, 2001 (gmt 0)

Browsers may still increase the rendered width of a cell, even if it's been set by pixels, in order to handle the cell content (such as manju's single word situation, where there is no space for the browser to use as an allowed line break).

Their may some CSS-2 method to handle this (CSS-2 gets into lots of table stuff that was not addressed in CSS-1). However, CSS-2 is still far from well supported by browsers.

So, I don't think that there is a dependable way to do this right now.


 11:58 am on Sep 6, 2001 (gmt 0)

Sorry for the bum lead Manju.



 1:42 pm on Sep 6, 2001 (gmt 0)

You could always nest a non-overflowing div tag in your cell... something along the lines of

<td width="30">
<div width="30" style="overflow:hidden">
content here

Let me know how you get on.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved