-1

I created a simple table to give a good view of my data.

The problem is created by field LIGHT_EXCEPTION, it not contains space, the content is very long and unfortunately I lose formatted table because i am not able to control the width of column. If I insert a space into LIGHT_ EXCEPTION the system control this case and I not lost the format table column.

Question: there is an alternative mothod to control this case?

I want that the column size table is fixed and when arrive at the end column continue to the next line automatically.

enter image description here

You can see in this attachments that the last column (8 column) is shifted to left. I want that if content is too long go to the next line automatically to continue the text.

Francesco Irrera
  • 445
  • 4
  • 21

1 Answers1

2

According to the CSS specifications, §17.3 Columns:

'width'
The 'width' property gives the minimum width for the column.

So, if the text inside a column is particularly long, the table width algorithm can decide to make the column larger than its width property.

If you want to set a fixed width for the whole table, use width on the table element; for example:

<table style="width:12cm">
    <tr style="...">
        ...
    </tr>
</table>
lfurini
  • 3,729
  • 4
  • 30
  • 48
  • 1
    the problem is that the field LIGHT_EXCEPTION not contains space and cannot go to the next line or manage new line. There is a method to control this case? – Francesco Irrera Apr 21 '15 at 07:50
  • 1
    Understood, so [this question and answer](http://stackoverflow.com/q/3247358/4453460) should help you. – lfurini Apr 21 '15 at 10:01