Skip to content

nafrente/responsive-table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Responsive Table

This is a simple solution to make tables responsive

The magic happens when we show the custom attribute content next to each td instead of the respoective th (we hid them on small screens). There is also included a script to replace the number with the actual content of the th if you don't feel like typing but this is optional, you can just add the custon property content and don't use the script.

The magic comes from this:

	td::before{
	    content: attr(data-head) ": ";
	}

Example page provided as well, check out the file index.html!

About

Simple solution for creating a responsive table

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published