1

Want to start off by saying I have tried this method with no success, it could be because I am doing it wrong idk...

So I have a 7 column table and my issue is that my 2nd column (TX4200) does not have a colspan but the width of that column seems to be bigger than I would like and as a result the other columns are suffering. I am thinking because of the type of layout my table has the auto-width algorithm is having some issues, so I want to try and take this on by brute force.

Things I have tried

table-layout: fixed

Setting the table width: 1000px; but even then the TX column still takes up the most space

min-width & max-width didn't do anything

Here is my fiddle http://jsfiddle.net/8Xy24/1/

Any help is much appreciated! Thanks in advance.

Community
  • 1
  • 1
Adjit
  • 10,134
  • 12
  • 53
  • 98

2 Answers2

2

You likely want to look at setting either the overflow to hidden or word-wrap to break-word in conjunction with the max-width for the cells in question depending on the kind of behaviour you want.

SW4
  • 69,876
  • 20
  • 132
  • 137
0

There you go:

http://jsfiddle.net/8Xy24/2/

I just added a td width:

td {
    width:50px;
}
man
  • 229
  • 3
  • 15
  • but that doesn't really make sense... none of the columns are 50px wide...I mean it works, I would still need to fiddle with it a bit but it makes no sense... – Adjit Dec 17 '13 at 15:35
  • giving a `td` a width is like setting a `min-width` and without that, the `table-layout: fixed` won't really take effect. – man Dec 17 '13 at 15:36
  • oh okay that makes sense now. – Adjit Dec 17 '13 at 15:40