Forum Moderators: open

Message Too Old, No Replies

td growing with text :(

         

sabongio

3:54 pm on Jul 6, 2005 (gmt 0)

10+ Year Member



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.

abbeyvet

4:01 pm on Jul 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What do you want it to do? If it is too wide for the table and cannot wrap, I am not sure what else can happen except what is happening?

sabongio

4:04 pm on Jul 6, 2005 (gmt 0)

10+ Year Member



I dont mind if the text isnt show. I just want to garantee that the size of the table(and the td's) remains the same.

thanks for the fast response.

Birdman

4:10 pm on Jul 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try this:

<td style="overflow: hidden;">

Cheers

sabongio

4:19 pm on Jul 6, 2005 (gmt 0)

10+ Year Member



I tried it but it didnt work :( at least not in firefox.
here my css for the td:

td{
font-size:10px;
margin:0;
padding:0;
white-space:nowrap;
overflow:hidden;
}

sabongio

4:34 pm on Jul 6, 2005 (gmt 0)

10+ Year Member



found the problem.

table-layout:fixed; :)

thanks once again for replying so fast.

dcrombie

8:54 am on Jul 11, 2005 (gmt 0)



See also:
[webmasterworld.com...]