isortope icon indicating copy to clipboard operation
isortope copied to clipboard

Table header width doesn't match table cells after initializing Isortope

Open daGUY opened this issue 12 years ago • 1 comments

After initializing Isortope on a standard HTML table, the table headers and the cells in their columns aren't computed to the same width, so they no longer line up.

Before:

screen shot 2013-10-09 at 10 40 41 am

After:

screen shot 2013-10-09 at 10 41 02 am

(Note: I added the red outlines just to make it easier to see the problem; the outlines themselves are not the cause).

The table is set to 100% width, inside of a Bootstrap column (33% width), inside of a containing element (1170px width). I thought the empty column on the right might have something to do with it, but it still happens even if I take that out.

I even tried forcing exact widths on each column in my stylesheet, and while that got the alignment closer, it still wasn't perfect.

Is there something else I'm missing?

daGUY avatar Oct 09 '13 14:10 daGUY

It seems that padding has something to do with it: if I set the padding on the cells to 0, then wrap each cell's contents in a <div> and then apply the padding to that <div> instead, it fixes the misalignment. However, I still see a slight vertical shift in the cell contents when Isortope is applied (enough that there's a noticeable "jump" when it kicks in).

I still think this is a bug, or at least undesirable behavior, since ideally you shouldn't see any visual change when Isortope is applied to a table, no?

daGUY avatar Oct 09 '13 15:10 daGUY