No name No name - 1 year ago 134
CSS Question

Table cell width uniform

I continue to develop and quest in css.
I want to put the table cells all with the same width, and not like how it appears in jsfiddle. I tried to manually put width to the "th tag" and "td tag" but they are not giving the widths I define.

.tablesorter {
margin: -5px 0 0 0;
table-layout: fixed;

.tablesorter td{
margin: 0;
padding: 0;
border-bottom: 1px dotted #ccc;

.tablesorter thead tr {
height: 34px;
text-align: left;
cursor: pointer;

The fiddle link is as follows:

Answer Source

Try this


table tr th, table tr td{
  word-break: break-all;

Click here for demo

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