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

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

HTML Forum

    
width of cell in table
manjumurthy

10+ Year Member



 
Msg#: 1011 posted 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
thanx
manjumurthy

 

GWJ



 
Msg#: 1011 posted 1:43 pm on Sep 5, 2001 (gmt 0)

Hi,

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

<TD WIDTH=600 BGCOLOR="#FFFFFF">Example</TD>

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

Brian

tedster

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 1011 posted 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.

GWJ



 
Msg#: 1011 posted 11:58 am on Sep 6, 2001 (gmt 0)

Sorry for the bum lead Manju.

Brian

joshie76

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 1011 posted 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

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

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