Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footer scroll fix when using the bootstrap theme #104

Merged
merged 1 commit into from
Apr 21, 2017

Conversation

smasala
Copy link

@smasala smasala commented Apr 21, 2017

When using the bootstrap 3 theme and the option scrollY: true, the footer stops scrolling before the table does, causes the columns to be out of line with the footer.

Example:
https://jsfiddle.net/hctp0bg2/

Fix:

div.dataTables_scrollFoot  > .dataTables_scrollFootInner {
    box-sizing: content-box;
}

On a side note:
Whilst implementing this pull request it seems that the current selector div.dataTables_scrollFoot > table { } is never met. When dataTables_scrollFoot is present then the child table is always inside dataTables_scrollFootInner (not a direct child), the element with border-top are the th elements inside the table and not the table itself. Hope this helps 馃憤

@DataTables
Copy link
Collaborator

Awesome thank you! Are you happy for this to be pulled in under the MIT license?

@smasala
Copy link
Author

smasala commented Apr 21, 2017

:) welcome. Yea no prob!

@DataTables DataTables merged commit 5bb3ec5 into DataTables:master Apr 21, 2017
@DataTables
Copy link
Collaborator

Wish I could remember why I had that >table bit in there. It does seem utterly redundant! Thanks for pointing that out.

@smasala
Copy link
Author

smasala commented Apr 21, 2017

how I feel everyday 馃憤 :) :)

When the y-scroll bar is there, then it makes sense to remove the margin and border. The border-top has since moved to the th elements though. However, if there is no scroll bar present, you need the border again :)
Example: https://jsfiddle.net/rbmhhote/

@DataTables
Copy link
Collaborator

I've opened #105 to make sure I don't forget about it before the next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants