I've been using HTML and CSS to style my resume, but I'm having difficulties styling a <tr> element.
Does this not work inside a table ?
-moz-border-radius: 5x;
-webkit-border-radius: 5px;
Click the Insert > Shapes button and choose the Rounded Rectangle tool.
Use the CSS border-radius property to add rounded corners to the table cells.
Yes, it works inside a table on td
and th
elements, but not on tr
. You can also use it on table
to round the corners of the whole table.
If you want to round a row of cells so that the left- and rightmost elements are rounded, you need to use the :first-child
and :last-child
pseudo classes:
tr td:first-child {
-moz-border-radius-topleft: 5px;
-moz-border-radius-bottomleft: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
}
tr td:last-child {
-moz-border-radius-topright: 5px;
-moz-border-radius-bottomright: 5px;
-webkit-border-top-right-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
}
first-child
is not supported by IE6, and while IE7 adds support for it, it still lacks last-child
. But that doesn't matter in your case as border-radius
wouldn't work in those browsers anyway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With