html table responsive for mobile code example
Example 1: table responsive
/*
Generic Styling, for Desktops/Laptops
*/
table {
width: 100%;
border-collapse: collapse;
}
/* Zebra striping */
tr:nth-of-type(odd) {
background: #eee;
}
th {
background: #333;
color: white;
font-weight: bold;
}
td, th {
padding: 6px;
border: 1px solid #ccc;
text-align: left;
}
Example 2: table responsive
First Name
Last Name
Job Title
James
Matman
Chief Sandwich Eater
The
Tick
Crimefighter Sorta