Skip to content

Instantly share code, notes, and snippets.

@iftee
Created December 27, 2015 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iftee/9cdb93ce555275f937e4 to your computer and use it in GitHub Desktop.
Save iftee/9cdb93ce555275f937e4 to your computer and use it in GitHub Desktop.
A quick CSS for basic responsive HTML table
/* CSS Snippet For Responsive Table - Basic */
* {
box-sizing: border-box;
}
table {
border-spacing: 0px;
border-collapse: collapse;
width: 100%;
max-width: 100%;
margin-bottom: 15px;
background-color: transparent; /* Change the background-color of table here */
text-align: left; /* Change the text-alignment of table here */
}
th {
font-weight: bold;
border: 1px solid #cccccc; /* Change the border-color of heading here */
padding: 8px;
}
td {
border: 1px solid #cccccc; /* Change the border-color of cells here */
padding: 8px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment