Mobile First Responsive Table

Size
4,026 Kb
Views
40,480

How do I make an mobile first responsive table?

Inspired by coyier's responsive tables. added a // bit of organization, style, mobile first, scss, etc.. What is a mobile first responsive table? How do you make a mobile first responsive table? This script and codes were developed by Nicholas M. Smith on 27 August 2022, Saturday.

Mobile First Responsive Table Previews

Mobile First Responsive Table - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Mobile First Responsive Table</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,800' rel='stylesheet' type='text/css'>
<table> <thead> <tr> <th>Maintenance Plans</th> <th>Annual Plus Plan </th> <th>Monthly Plus Plan</th> <th>Complete Plus Plan</th> </tr> </thead> <tbody> <tr> <td>100% Satisfaction, Guaranteed</td> <td><span class="fontawesome-ok-sign"></span></td> <td><span class="fontawesome-ok-sign"></span></td> <td><span class="fontawesome-ok-sign"></span></td> </tr> <tr> <td>Quality Service Every Visit</td> <td><span class="fontawesome-ok-sign"></span></td> <td><span class="fontawesome-ok-sign"></span></td> <td><span class="fontawesome-ok-sign"></span></td> </tr> <tr> <td>Daytime, Nighttime, On-Time</td> <td><span class="fontawesome-ok-sign"></span></td> <td><span class="fontawesome-ok-sign"></span></td> <td><span class="fontawesome-ok-sign"></span></td> </tr> <tr> <td>NATE-Certified Professional Techs</td> <td><span class="fontawesome-ok-sign"></span></td> <td><span class="fontawesome-ok-sign"></span></td> <td><span class="fontawesome-ok-sign"></span></td> </tr> <tr> <td>Humidifier Service</td> <td><span class="entypo-cancel-circled"></span></td> <td><span class="fontawesome-ok-sign"></span></td> <td><span class="fontawesome-ok-sign"></span></td> </tr> <tr> <td>29 Point Performance Inspection</td> <td><span class="entypo-cancel-circled"></span></td> <td><span class="fontawesome-ok-sign"></span></td> <td><span class="fontawesome-ok-sign"></span></td> </tr> <tr> <td>Performance Recommendation</td> <td><span class="entypo-cancel-circled"></span></td> <td><span class="fontawesome-ok-sign"></span></td> <td><span class="fontawesome-ok-sign"></span></td> </tr> <tr> <td>Future Repair Consultation</td> <td><span class="entypo-cancel-circled"></span></td> <td><span class="entypo-cancel-circled"></span></td> <td><span class="fontawesome-ok-sign"></span></td> </tr> <tr> <td>Future Maintenance Consultation</td> <td><span class="entypo-cancel-circled"></span></td> <td><span class="entypo-cancel-circled"></span></td> <td><span class="fontawesome-ok-sign"></span></td> </tr> <tr> <td>Comfort Tip Emails & Reminders</td> <td><span class="entypo-cancel-circled"></span></td> <td><span class="entypo-cancel-circled"></span></td> <td><span class="fontawesome-ok-sign"></span></td> </tr> </tbody> <tfoot> <tr> <th>Maintenance Plans</th> <th>$219 / Year</th> <th>$18.25 / Month</th> <th>$35 / Month</th> </tr> </tfoot>
</table> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Mobile First Responsive Table - Script Codes CSS Codes

@import url(http://weloveiconfonts.com/api/?family=entypo|fontawesome);
[class*="entypo-"]:before { color: #BE1616; font-family: 'entypo', sans-serif; font-size: 2em;
}
[class*="fontawesome-"]:before { color: #1D8812; font-family: 'FontAwesome', sans-serif; font-size: 2em;
}
.yellow { color: yellow;
}
.red { color: red;
}
@media (max-width: 760px) { table, thead, tbody, th, td, tr { display: block; }
}
table { font-family: 'Open Sans', sans-serif; margin: 20px auto; min-width: 300px; width: 95%;
}
thead tr { position: absolute; left: -9999px; top: -9999px;
}
@media (min-width: 760px) { thead tr { position: static; }
}
tfoot tr { position: absolute; left: -9999px; top: -9999px;
}
@media (min-width: 760px) { tfoot tr { position: static; }
}
th { border: none; color: black;
}
@media (min-width: 760px) { th { background: #244089; color: white; font-size: 1.5em; padding: 20px; text-align: center; } th:nth-child(2) { background: #8b2121; } th:nth-child(3) { background: #ae292a; } th:nth-child(4) { background: #cc3433; }
}
td { border: none; font-size: 0.8em; padding: 1% 0 1% 60%; position: relative; text-align: center;
}
@media (min-width: 760px) { td { background: #333; border: 2px solid white; color: white; font-size: 0.9em; padding: 20px; text-align: center; }
}
td img { width: 20px;
}
@media (min-width: 760px) { td img { width: 30px; }
}
td:before { left: 6px; padding-right: 10px; position: absolute; top: 6px; white-space: nowrap; width: 45%;
}
td:nth-of-type(1):before { content: "Maintenance Plans:"; font-weight: bold; padding-bottom: 3px;
}
@media (min-width: 760px) { td:nth-of-type(1):before { content: ""; }
}
td:nth-of-type(2):before { content: "Annual + Plan $219/yr";
}
@media (min-width: 760px) { td:nth-of-type(2):before { content: ""; }
}
td:nth-of-type(3):before { content: "Monthly + Plan $18.25/month";
}
@media (min-width: 760px) { td:nth-of-type(3):before { content: ""; }
}
td:nth-of-type(4):before { content: "Complete + Plan $35/month";
}
@media (min-width: 760px) { td:nth-of-type(4):before { content: ""; }
}
tr { border: 1px solid white; padding: 10px 5px;
}
tr:nth-child(odd) { background: #999; color: white;
}
tr:nth-child(even) { background: #333; color: white;
}

Mobile First Responsive Table - Script Codes JS Codes

// inspired by coyier's responsive tables. added a bit of // organization, style, mobile first, scss, etc.
// Source:
// http://css-tricks.com/responsive-data-tables/
Mobile First Responsive Table - Script Codes
Mobile First Responsive Table - Script Codes
Home Page Home
Developer Nicholas M. Smith
Username icutpeople
Uploaded August 27, 2022
Rating 3
Size 4,026 Kb
Views 40,480
Do you need developer help for Mobile First Responsive Table?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Nicholas M. Smith (icutpeople) Script Codes
Create amazing web content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!