Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to lock the width of a TD indipendently from text?

 
Giulietta Blumarine
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I have a table with width="200".
In this table I have a td in which I show a text.
If this text is too long and all attached(for example: GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG), this text goes beyond table width and exceeds 200.
How to force and lock the width=200, sending the text down to head?
Thanks!!!

Giu
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64844
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not believe that you can do anything like that in the browsers using the td element.

You might try embedding a <div> in the td and using the width, overflow and/or clip CSS rules to obtain the behavior that you want.
[ August 03, 2006: Message edited by: Bear Bibeault ]
 
Giulietta Blumarine
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I have tried div style="width:100px;" inside the TD but nothing....
There is some other CSS rule?

Thanks
GIU
 
Arulanand Dayalan
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this
style='width:400;text-wrap;word-wrap: break-word;'
 
Liu Zhixiang
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
table { table-layout:fixed;}
td { text-overflow:ellipsis;overflow:hidden;white-space: nowrap;padding; }

add in your stylesheet.

ou ,ye
you can control the td's width. ((IE ONLY))





text-overflow:ellipsis|clip; ellipsis:“…” clip:there is no "…"

[ August 14, 2006: Message edited by: snowwolf ]

[ August 14, 2006: Message edited by: snowwolf ]
[ August 14, 2006: Message edited by: Liu Zhixiang ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic