Mobile First Responsive Table
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 - 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/
Developer | Nicholas M. Smith |
Username | icutpeople |
Uploaded | August 27, 2022 |
Rating | 3 |
Size | 4,026 Kb |
Views | 40,480 |
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!
Name | Size |
Animated Image Hovers | 3,687 Kb |
Loader | 2,786 Kb |
Blur Image Hovers | 4,013 Kb |
Aside Nav Animated | 3,326 Kb |
CSS Off Canvas Menu | 5,143 Kb |
CSS 8-Bit Box Shadow DuckTales | 4,376 Kb |
Tooltip | 3,142 Kb |
Wordpress 3.8 loader | 2,083 Kb |
Flexbox Test | 2,486 Kb |
HTML5 Video Text Overlay Flexbox | 3,024 Kb |
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!
Name | Username | Size |
Contact | GanNichiHa | 2,514 Kb |
Clock Face Idea | Chrisburnell | 3,196 Kb |
CSS background-size - GSAP | Jonathan | 2,209 Kb |
Starfield using KineticJS | Asp | 3,512 Kb |
Scoreboard.js basic usage | Tbleckert | 1,733 Kb |
Twitch TV | Natester13 | 4,488 Kb |
Css3 only dropdown menu | Riogrande | 2,519 Kb |
Loading animation | Codeams | 2,408 Kb |
Popover Example | Seanboom | 2,429 Kb |
CSS Infinite 360 | APinix | 5,564 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!