border-radius property
[This documentation is preliminary and is subject to change.]
Sets or retrieves one or more values that define the radii of a quarter ellipse that defines the shape of the corners for the outer border edge of the current box.
![]() |
Syntax
border-radius: radius | percentage
Property values
A variable of type String that specifies or receives one or two radius values.
radius-
A floating-point number, followed by either an absolute units designator (
cm,mm,in,pt, orpc) or a relative units designator (em,ex, orpx). For more information about the supported length units, see CSS Values and Units Reference. percentage-
An integer, followed by a %. The value is a percentage of, for horizontal radii, the width of the border box, or, for vertical radii, the height of the border box.
CSS information
| Applies To | All elements |
|---|---|
| Media | visual |
| Inherited | no |
| Initial Value |
Standards information
- CSS Backgrounds and Borders Module Level 3, Section 4.4
Remarks
The border-radius property is a composite property that specifies up to four border-*-radius properties. If values are given before and after the slash, the values before the slash set the horizontal radius and the values after the slash set the vertical radius. If there is no slash, the values set both radii equally. The four values for each radii are given in the following order: top-left, top-right, bottom-right, bottom-left. If the bottom-left value is omitted, the value is the same as the top-right value. If the bottom-right value is omitted, the value is the same as the top-left value. If the top-right value is omitted, the value is the same as the top-left value.
See also
- CSSStyleDeclaration
- currentStyle
- style
- defaults
- runtimeStyle
- Reference
- border-top-right-radius
- border-bottom-left-radius
- border-bottom-right-radius
- border-top-left-radius
Build date: 3/13/2012
- 1/10/2012
- ThorstenArtner
- 6/21/2011
- Oh Buster Luke
- 6/9/2011
- Rim van Wersch
- 4/23/2011
- BrienMuller
- 3/25/2011
- TICKms
here's my code for the main container div that wraps all of my output content for an entire page
#container {
border: 1px solid black;
background-color: white;
width: 1100px;
margin: 20px auto 50px auto;
-moz-box-shadow: -10px 10px 30px black;
-webkit-box-shadow: -10px 10px 30px black;
box-shadow: -10px 10px 30px black;
/* below is #container border radius code */
-moz-border-radius-bottomleft: 10px;
-moz-border-radius-bottomright: 10px;
-webkit-border-bottom-left-radius: 10px;
-webkit-border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
- 3/17/2011
- cmegown
