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
  • 49,672
  • 25
  • 199
  • 336
Shahriar
  • 13,460
  • 8
  • 78
  • 95

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,904
  • 5
  • 47
  • 59
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...