Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

td growing with text :(

Status
Not open for further replies.

JKPeus

MIS
May 11, 2005
19
US
hi all.

I have a problem with a td that I want to have a size of 100. I'm using css for this.
the problem is if the text that is in the td is larger than 100 the td will grow as big as the text is.

for example if the text is this :
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

than the td will have that size and I want it to have a fixed size.

I also dont want the text to creat new paragrafs so I'm using white-space:nowrap; in the css.

can someone help me?
thanks in advance.
 
Try using either this:

Code:
<table style="table-layout:fixed;">
   <tr>
      <td style="width:100px;">
...

or this:

Code:
<table>
   <tr>
      <td style="width:100px; overflow:hidden;">
...

or a combination of the both:

Code:
<table style="table-layout:fixed;">
   <tr>
      <td style="width:100px; overflow:hidden;">
...

Hope this helps,
Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top