janhoedt
asked on
CSS HTML: format only 1 table in CSS
Hi,
How do I format a certain table in css (like this: https://www.w3schools.com/css/tryit.asp?filename=trycss_table_border_divider), while leaving alone other tables in my html?
J.
How do I format a certain table in css (like this: https://www.w3schools.com/css/tryit.asp?filename=trycss_table_border_divider), while leaving alone other tables in my html?
J.
You can create a new css class and assign it to the specific table, or you could use the style attribute on the table itself to customize.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm explicitely mentionig the example
<style>
table {
border-collapse: collapse;
width: 100%;
}
th, td {
padding: 8px;
text-align: left;
border-bottom: 1px solid #ddd;
}
</style>
You only mention the table but what about the th and td
<style>
table {
border-collapse: collapse;
width: 100%;
}
th, td {
padding: 8px;
text-align: left;
border-bottom: 1px solid #ddd;
}
</style>
You only mention the table but what about the th and td