Responsive Table
How do I make an responsive table?
What is a responsive table? How do you make a responsive table? This script and codes were developed by Kevin on 13 October 2022, Thursday.
Responsive Table - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Responsive Table</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <table class="tg"> <thead> <tr class="titles"> <th>Brand</th> <th>Taurine</th> <th>Prebiotics & Probiotics</th> <th>Contains BHA or BHT</th> </tr> </thead> <tbody> <tr class="kmr"> <td>KMR®</td> <td>YES</td> <td>YES</td> <td>NO</td> </tr> <tr class="petlac"> <td>Pet-Lac®</td> <td>YES</td> <td>YES</td> <td>NO</td> </tr> <tr class="comp1"> <td>Competitor A</td> <td>YES</td> <td>NO</td> <td>YES</td> </tr> <tr class="comp2"> <td>Competitor B</td> <td>YES</td> <td>NO</td> <td>NO</td> </tr> <tr class="comp3"> <td>Competitor C</td> <td>YES</td> <td>NO</td> <td>NO</td> </tr> </tbody>
</table> <script src="js/index.js"></script>
</body>
</html>
Responsive Table - Script Codes CSS Codes
.tg { text-align: center; width: 100%; border-collapse: collapse; color: #847976;
}
.tg th { padding: 4px; font-weight: bold;
}
.tg td { padding: 4px;
}
.titles th:nth-of-type(odd) { background: #f8f7f7;
}
.titles th:nth-of-type(even) { background: #fbfafa;
}
.kmr td:nth-of-type(odd) { background: #fedab3;
}
.kmr td:nth-of-type(even) { background: #fee9d1;
}
.petlac td:nth-of-type(odd) { background: #ffe6cb;
}
.petlac td:nth-of-type(even) { background: #fff0e0;
}
.comp1 td:nth-of-type(odd) { background: #c7dbf1;
}
.comp1 td:nth-of-type(even) { background: #dde9f7;
}
.comp2 td:nth-of-type(odd) { background: #e1ecf8;
}
.comp2 td:nth-of-type(even) { background: #edf4fb;
}
.comp3 td:nth-of-type(odd) { background: #c7dbf1;
}
.comp3 td:nth-of-type(even) { background: #dde9f7;
}
Responsive Table - Script Codes JS Codes
//no js
Developer | Kevin |
Username | gnarfugh |
Uploaded | October 13, 2022 |
Rating | 3 |
Size | 2,303 Kb |
Views | 16,192 |
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 |
Ajax Flickr Search | 7,084 Kb |
Small fizzbuzz | 1,412 Kb |
Mess svg logo | 2,249 Kb |
A Pen by kevin | 3,018 Kb |
Google Maps api | 2,795 Kb |
Hover tabs with column wrapper | 7,014 Kb |
Understanding closures | 2,170 Kb |
React Scoreboard | 3,912 Kb |
Sticky nav | 5,206 Kb |
Highlight table | 90,049 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 |
Simple personal profile | Miroot | 2,856 Kb |
Delete Hover | Chungman93 | 2,557 Kb |
A Pen by Anoop | Anoopjohn | 330,760 Kb |
Midterm dry run | Jds317 | 1,649 Kb |
Header Line Issue | Charlie-volpe | 1,768 Kb |
Comparison of Roboto Draft vs Roboto | Jxnblk | 2,880 Kb |
Impress JS Algorhytmic Generator | Jeffscottward | 7,906 Kb |
Css color for svg | Ademilter | 2,392 Kb |
JQuery AJAX reddit Exercise | Btholt | 1,777 Kb |
Material design buttons | Fischaela | 4,381 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!