jacen6678
08-27-2003, 10:07 AM
I want to build a page with 2 different styles of tables. One style should have no borders and the other should borders around every <td>. How can I get bordered <td>'s and unbordered <td>'s without specifying the class for every single <td> element?
What I have tried:
.no_borders{
border-collapse: collapse;
border-style: none;
margin: 0;
padding: 0;
}
.borders{
border-collapse: collapse;
border-color: black;
border-style: solid;
border-width: 1;
margin: 0;
padding: 0;
}
If I apply class="borders" to the table elements, I only get borders around the table. I want to avoid applying class="borders" to every single <td> element that should have borders. B\c I also need no-border tables, I cannot do
td{
border-collapse: collapse;
border-color: black;
border-style: solid;
border-width: 1;
margin: 0;
padding: 0;
}
I tried td{
border-collapse: inherit;
border-color: inherit;
etc... } in combination with classing the table elements and had no luck with that either.
What I have tried:
.no_borders{
border-collapse: collapse;
border-style: none;
margin: 0;
padding: 0;
}
.borders{
border-collapse: collapse;
border-color: black;
border-style: solid;
border-width: 1;
margin: 0;
padding: 0;
}
If I apply class="borders" to the table elements, I only get borders around the table. I want to avoid applying class="borders" to every single <td> element that should have borders. B\c I also need no-border tables, I cannot do
td{
border-collapse: collapse;
border-color: black;
border-style: solid;
border-width: 1;
margin: 0;
padding: 0;
}
I tried td{
border-collapse: inherit;
border-color: inherit;
etc... } in combination with classing the table elements and had no luck with that either.