Skip to content Skip to sidebar Skip to footer

Td Width Is Bigger Than It Should Be

http://jsfiddle.net/kpz8hxuy/

Loremipsum

Solution 1:

By default the table-layout is auto. Even when you've defined the width of the table td it will expand depending on its contents. So, using fixed layout for the table wouldn't automatically expand the contents rather it would be set within the defined width.

table{
  table-layout: fixed;
}

And when you are trying to use td width in just 1px, I suppose you're trying to use a border, so, use border instead of defining the td width.

tabletd{
   border-left: 1px solid #000;
}

Solution 2:

You should use border-left: 1px solid #ddd on your td instead of this 1px column. You shouldn't use a column of your table for layout purpose.

Post a Comment for "Td Width Is Bigger Than It Should Be"