0

In my HTML table, the width of a column increases, when the text inside is larger than the column width. I can use overflow:hidden to keep the width in a fixed size; But i want to do something like the image bellow:

Actual text is ( 485 - Pascal's Triangle of Death ) when it is larger than the width of a column, the text will be shown like the image. i've failed to do it manually. is there any easy way?

vitaut
  • 43,200
  • 23
  • 168
  • 291
Shahriar
  • 12,388
  • 6
  • 75
  • 93

2 Answers2

1

You can use style sheets to take care of this. You can set the text-overflow to ellipsis

There is an existing SO which demonstrates this:

CSS text-overflow in a table cell?

Community
  • 1
  • 1
Khan
  • 17,118
  • 3
  • 45
  • 58
1

There is a css property named ellipsis to do this...

Try this...

#your_element_id {

text-overflow : ellipsis;
overflow:hidden;
white-space: nowrap;

}

This might work...