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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed header #524

Open
samyomar opened this issue Jan 25, 2015 · 7 comments
Open

Fixed header #524

samyomar opened this issue Jan 25, 2015 · 7 comments

Comments

@samyomar
Copy link

the ability to add fixed header will be very good

@christianacca
Copy link
Collaborator

Maybe this can be achieved using just css?

A quick look on SO:

@c-eliasson
Copy link

@christianacca For vertical scrolling, it would be an easy fix with CSS using overflow-y: auto; on the tbody. For horizontal scrolling on the other hand, is it a whole different story.

For horizontal scrolling, you cannot do it with pure CSS, from what I know. The problem is that the columns in the thead would not scroll along with the columns in tbody. To solve that, I've seen some jQuery plugins that brake the table into two separate tables, one containing the thead and one containing tbody and then they scroll both tables simultaneously using javascript.

@RohitUdayTalwalkar
Copy link

@c-eliasson - I'm having some trouble with your suggestion, the table headers are still scrolling even with that style applied to the body. Any chance you've got an example I can look at?

@c-eliasson
Copy link

@RohitUdayTalwalkar You would probably have to set display: block; on the tbody as well.

Example

@RohitUdayTalwalkar
Copy link

@c-eliasson https://github.com/c-eliasson
Great, that works!
The width doesn't match the header but I think I can write a directive to
get that working.

Thanks for the quick response!

-Rohit

On Mon, Mar 9, 2015 at 1:46 PM, Christofer Eliasson <
notifications@github.com> wrote:

@RohitUdayTalwalkar https://github.com/RohitUdayTalwalkar You would
probably have to set display: block; on the tbody as well.

Example https://jsfiddle.net/6wsds9rn/


Reply to this email directly or view it on GitHub
#524 (comment).

@anthony-o
Copy link

anthony-o commented May 11, 2016

@theaspect
Copy link

See #41 (comment)

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

No branches or pull requests

6 participants