In my site I need to make a div have rounded corners only on the top corners. But I don't know how to do this. Can someone help me?
CSS Syntaxborder-top-left-radius: length|% [length|%]|initial|inherit; Note: If you set two values, the first one is for the top border, and the second one for the left border. If the second value is omitted, it is copied from the first. If either length is zero, the corner is square, not rounded.
Definition and Usage The border-top-right-radius property defines the radius of the top-right corner. Tip: This property allow you to add rounded borders to elements!
Brendan's answer is correct, but to get it to render in more browsers, you should use this:
-moz-border-radius: 0px; -webkit-border-radius: 3px 3px 0px 0px; border-radius: 3px 3px 0px 0px;
border-top-left-radius: 3px; border-top-right-radius: 3px;
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