Reputation: 1145
I am trying to make the top left and top right end of the table circular, but applying the following code will also make the bottom left and bottom right circular. Any idea how to fix it?
/* sets the curvature of the box */
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
-o-border-radius: 10px;
Upvotes: 0
Views: 141
Reputation: 186
Use the following code and it will work
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
Upvotes: 0
Reputation: 94499
You can specify each corner of the border with this property. It goes as follows:
border-radius: [top-left] [top-right] [bottom-left] [bottom-right]
border-radius: 10px 10px 0px 0px;
-moz-border-radius: 10px 10px 0px 0px;
-webkit-border-radius: 10px 10px 0px 0px;
-o-border-radius: 10px 10px 0px 0px;
Upvotes: 1
Reputation: 32202
Used to this
border-radius: 10px 10px 0 0;
-moz-border-radius: 10px 10px 0 0;
-webkit-border-radius: 10px 10px 0 0;
-o-border-radius: 10px 10px 0 0;
Upvotes: 2
Reputation: 103388
Specify just top left and top right:
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
border-radius.com is a useful quick tool for creating border radius this way.
Upvotes: 3