• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

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

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this
style='width:400;text-wrap;word-wrap: break-word;'
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic