DataTables / FixedHeader

Fix the header, footer, left or right columns of a table in place, to always show them when scrolling
http://www.datatables.net/
Other
75 stars 83 forks source link

FixedHeader not compatible with Bootstrap (v3) integration #32

Closed althaus closed 9 years ago

althaus commented 10 years ago

Hey,

using Boostrap for styling results into FixedHeader not being placed correctly:

http://jsfiddle.net/xF8hZ/1/

Seems like issues with margin/padding. Will look into it.

Cheers Matthias

DataTables commented 10 years ago

It looks like an error (or rather incompleteness) in my Bootstrap compatibility file. The integration is adding padding to the table, which is causing the shift in position.

It needs:

div.FixedHeader_Cloned table { margin: 0 !important }

to fix it I think.

althaus commented 10 years ago

I've updated the fiddle: http://jsfiddle.net/xF8hZ/3/ (also added alwaysCloneTop from #29 )

Now it looks almost perfect. I've still got 1px offset, which is caused by the border-left width set by .table-bordered and taken into account by jQuery's outerWidth.

althaus commented 9 years ago

Fixed in https://github.com/DataTables/Plugins/commit/28e7751dbec35ea2d18e18d9fd8d6b2ddcfe287b