markmalek/Fixed-Header-Table — pull request #84 by loostro (2013-08-08 14:07:54+00:00)
Title: [Bug] Bad column width when some of the columns are collapsed (hidden) 

I've applied this plugin to a table with:

```css
table td,
table th {
display: none; /* hide all cells */
}

table td.row-label,
table th.row-label,
table td.active,
table th.active {
display: table-cell !important; /* except label and active cells */
}
```

So the markup:

```html

Employee
product1 sales
product2 sales
product3 sales

Rob Zombie
5
3
7

```

Which will display:

```bash
+------------+----------------+
| Employee | product1 sales |
+------------+----------------+
| Rob Zombie | 5 |
+------------+----------------+
```

Then I added 3 tabs (Product1, Product2, Product3) which with some js ([twitter bootstrap's tab](http://getbootstrap.com/2.3.2/javascript.html#tabs)) add/remove the `active` class from cells (so you can hide "product1" column and show "product2" column instead).

However, the "padding-right" that was applied to last cell approach does not work, when some cells are hidden. The cell widths are not correct. Eg:

```html

```

Since dynamicaly adding/removeing padding from visible/hidden cells would be a pain in the ass and could cause more problems, instead I've moved the padding to the div wrapper which solves the problem.

Ofcourse, this makes the scrollbar appear "outside" the table, but that could be fixed by applying borders to `fht-table-wrapper` and removeing outer borders from the `table`.