Ahmad Ahmad - 1 year ago 100
CSS Question

Text inside td not utilizing entire cell width

I have a strange problem which I can't seem to figure out. I have a

showing some timestamp text inside it. The strange thing is that this text would rather use multiple lines than use the whole cell width available to it before moving to the next line. There's ample width available, so how do I make the timestamp text fit in just one line ?

enter image description here

The CSS currently being applied to the
is the following:

width: 30%;
word-wrap: break-word;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
text-align: center;

Note that the
properly above is being used to set the width of the
relative to the entire table width.

Answer Source

The width of your <div> child element of the <td> is getting set to 30% of the width of the cell and not the table. Try setting the width to 100% in the splunk-timedata-field class.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download