diff options
author | bt <bt@web> | 2024-02-23 10:36:44 -0500 |
---|---|---|
committer | IkiWiki <ikiwiki.info> | 2024-02-23 10:36:44 -0500 |
commit | 2d5761c98c7de1ab88fada649af812c37a799cd5 (patch) | |
tree | d9ee5c5265454dc5398884b987e89b22b58af1fd /posts | |
parent | 5f1f9aa7bb1bca9f9139a69a0ae9d5aedbaccd23 (diff) |
Diffstat (limited to 'posts')
-rw-r--r-- | posts/Please_Make_Your_Table_Headings_Sticky.mdwn | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/posts/Please_Make_Your_Table_Headings_Sticky.mdwn b/posts/Please_Make_Your_Table_Headings_Sticky.mdwn index a9abd38..7ecda82 100644 --- a/posts/Please_Make_Your_Table_Headings_Sticky.mdwn +++ b/posts/Please_Make_Your_Table_Headings_Sticky.mdwn @@ -1,6 +1,9 @@ I often stumble upon large data sets or table layouts across the web. When these tables contain hundreds of rows of content, things become problematic once you start to scroll... -![Video showcasing a standard table header](https://btxx.org/posts/Please_Make_Your_Table_Headings_Sticky/not-fixed-header-tables.mp4) + <video width="100%" controls> + <source src="https://btxx.org/posts/Please_Make_Your_Table_Headings_Sticky/not-fixed-header-tables.mp4" type="video/mp4"> +Your browser does not support the video tag. +</video> Look at that table header disappear! Now, if I scroll all the way down to item #300 (for example) will I remember what each column's data is associated with? If this is my first time looking at this table - probably not. Luckily we can fix this (no pun intended!) with a tiny amount of CSS. @@ -8,7 +11,10 @@ Look at that table header disappear! Now, if I scroll all the way down to item # Check it out: -![Video showcasing a fixed table header](https://btxx.org/ikiwiki/git/fixed-header-tables.mp4) + <video width="100%" controls> + <source src="https://btxx.org/ikiwiki/git/fixed-header-tables.mp4" type="video/mp4"> +Your browser does not support the video tag. +</video> Pretty awesome, right? It might look like magic but it's actually very easy to implement. You only need to add 2 CSS properties on your `thead`: |