I have a table and I have a tr with a class set to "underRow".
In CSS I have:
.underRow {
border-bottom-color: #7a26b9;
border-bottom-style: solid;
border-bottom-width: 1px;
}
but the row border doesn't seem to be changing at all. If I move the class attribute down to the td's it works fine (but the issue is that I get a space in the middle where the padding is between the cells. I want to avoid this space and have one straight line below the row.
Is there anything wrong with putting CSS border attributes on a row (tr) element?
Here is the rest of the CSS on this table for reference:
.quantityTable {
border-radius: 5px 5px 5px 5px;
background-color: #d6b4E1;
padding: 5px;
margin-bottom: 5px;
width: 100%;
border-width: 2px;
border-color: #7a26b9;
border-style: solid;
}
Some versions of some browsers don't take kindly to setting border styles on
tr
elements.You can always set them on their
td
s instead.If there is border spacing you may need to collapse your table borders using
border-collapse: collapse;
.No it should work.
See this: http://jsfiddle.net/jasongennaro/qCzrg/
Perhaps you need to collapse your borders with
Or maybe other styles for the
TD
is overridingCan you show some more code.
As per your edit:
Sounds like you definitely need
border-collapse
You should add it to the style of the
table
.Here's a bit more about it: http://www.the-art-of-web.com/css/bordercollapse/
EDIT 2
Based on the new code and the following comment:
I am guessing you want something like this
Example: http://jsfiddle.net/jasongennaro/qCzrg/1/
NOTE
I made the radius bigger so you could see it easier.
I also removed the border from the table itself