Can you help me with making the table corners round? I've tried the simple border-radius
but this just split the border in the corners. Is this caused by my browser (Firefox) or its a bug ? Jsfiddle - http://jsfiddle.net/vuys8eef/
Asked
Active
Viewed 690 times
0

Brian Tompsett - 汤莱恩
- 5,753
- 72
- 57
- 129

S.Yankov
- 107
- 2
- 9
-
1Your question can be answered here [Rounded Table Corners CSS Only](http://stackoverflow.com/questions/4932181/rounded-table-corners-css-only) – Patrick Sharer Nov 05 '15 at 20:29
-
Possible duplicate of [Rounded table corners CSS only](https://stackoverflow.com/questions/4932181/rounded-table-corners-css-only) – Brian Tompsett - 汤莱恩 Feb 09 '18 at 12:16
3 Answers
3
You need to round corners for the first and last columns of your first and last row in your table.
Something like this:
table tr:first-child th:first-child {
border-top-left-radius: 10px;
}
table tr:first-child th:last-child {
border-top-right-radius: 10px;
}
table tr:last-child td:first-child {
border-bottom-left-radius: 10px;
}
table tr:last-child td:last-child {
border-bottom-right-radius: 10px;
}
You can see your updated fiddle

service-paradis
- 3,333
- 4
- 34
- 43
1
You were applying it to the wrong element, use this instead.
td, th{
border-radius: 5px;
}

Peter Girnus
- 2,673
- 1
- 19
- 24