I\'m trying to design some HTML/CSS that can put a border around specific rows in a table. Yes, I know I\'m not really supposed to use tables for layout but I don\'t know en
Thank you to all that have responded! I've tried all of the solutions presented here and I've done more searching on the internet for other possible solutions, and I think I've found one that's promising:
tr.top td {
border-top: thin solid black;
}
tr.bottom td {
border-bottom: thin solid black;
}
tr.row td:first-child {
border-left: thin solid black;
}
tr.row td:last-child {
border-right: thin solid black;
}
no border
no border here either
one
two
three
four
once again no borders
hello
world
Output:

Instead of having to add the top, bottom, left, and right classes to every , all I have to do is add top row to the top , bottom row to the bottom , and row to every in between. Is there anything wrong with this solution? Are there any cross-platform issues I should be aware of?