From 14074019d62d98885c4c764401a9e7e1fd129f79 Mon Sep 17 00:00:00 2001 From: Bradley Taunt Date: Mon, 10 Jun 2024 10:12:28 -0400 Subject: Set proper timestamps for header and footer HTML templates, update some post contents --- build/posts/Please_Make_Your_Table_Headings_Sticky/index.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'build/posts/Please_Make_Your_Table_Headings_Sticky/index.html') diff --git a/build/posts/Please_Make_Your_Table_Headings_Sticky/index.html b/build/posts/Please_Make_Your_Table_Headings_Sticky/index.html index 6f37f67..3939d59 100644 --- a/build/posts/Please_Make_Your_Table_Headings_Sticky/index.html +++ b/build/posts/Please_Make_Your_Table_Headings_Sticky/index.html @@ -19,20 +19,18 @@

Please Make Your Table Headings Sticky

2024-02-23

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…

-

Your browser does not support the video tag. -

+

Click here to see standard table headers 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.

Check it out:

-

Your browser does not support the video tag. -

+

Click here to see “fixed” table headers 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:

position: sticky;
 top: 0;
 

That’s it! Best of all, sticky has ~96% global support which means this isn’t some “bleeding-edge” property and can safely support a ton of browsers. Not to mention the improved experience for your end-users!

You can view a live demo of this table on the CodePen example pen.

-

If you found this interesting, feel free to check out my other table-focused post: Making Tables Responsive With Minimal CSS

+

If you found this interesting, feel free to check out my other table-focused post: Making Tables Responsive With Minimal CSS