Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

border-radius on <th>. No border rounding

Tags:

css

I have css looks like that:

#caltable th {
    border: solid 1px #333;
    border-radius: 7px;
    background: #f00;
}

But this is what i've got in browser (Chrome/FF):

enter image description here

The question is how to get black line also rounded?

like image 382
H1D Avatar asked Oct 02 '11 09:10

H1D


People also ask

Why border radius is not working?

Your problem is unrelated to how you have set border-radius . Fire up Chrome and hit Ctrl+Shift+j and inspect the element. Uncheck width and the border will have curved corners. Show activity on this post.


1 Answers

Change border-collapse:collapse to border-collapse:separate on the <table>.

You should also add support for browsers which are not at the newwest version:

-moz-border-radius: 7px;
-o-border-radius: 7px;
-ms-border-radius: 7px;
-webkit-border-radius: 7px;
like image 120
Rob W Avatar answered Sep 27 '22 19:09

Rob W