hari
hari

Reputation: 59

How to create the upper rounded corner of div and bottom is square?

Give the css code for rounded corner of div. i want to create the rounded corner of div but only upper corner.

Upvotes: 0

Views: 3708

Answers (2)

Spudley
Spudley

Reputation: 168755

CSS rounded corners are done using the border-radius style.

border-radius: 5px;

If you want to do specific corners, you can split it out into four separate styles (border-top-left-radius, etc) or specify four values for the basic border-radius style:

border-radius: 5px 0 5px 0;

border-radius is supported by current versions of all browsers, but older versions may need a vendor prefix (eg -webkit-border-radius or -moz-border-radius), and may also have different syntax for the separate four corner styles.

Older versions of IE (IE8 and lower) do not support it at all, but there is a good hack to make it work for them called CSS3Pie

Hope that helps.

Upvotes: 4

Tim B James
Tim B James

Reputation: 20364

This is a very good site for creating the CSS code for border radii

http://border-radius.com/

Upvotes: 1

Related Questions