vendredi 10 juin 2016

Table with fixed thead with horizontal and vertical scroll


I have calendar with list of users in left side and in right side - dates with cell. On top I need fix dates when scroll page to bottom. I don't know how I can make it because I have <table> with dates in main <table> with overflow: scroll, because I need scroll and fixed left-side-users.

How I can fix <thead> with dates on top when scrolling to bottom of page? It's now simple position: absolute; because I have nested table and overflow: scroll;. Split table with dates on thead and tbody in two different tables? And catch event scroll and apply this to other table?

JSFiddle - https://jsfiddle.net/p69j0L5h/2/

P.S. In real situation all cells are equal (about width and height). This is just example.


Aucun commentaire:

Enregistrer un commentaire