YouTip LogoYouTip

Prop Style Bordertoprightradius

# Style borderTopRightRadius Property [![Image 8: Style Object Reference](#) Style Object](#) ## Example Add a rounded border to the top-right corner of a div element: document.getElementById("myDIV").style.borderTopRightRadius="25px"; [Try it Yourself Β»](#) * * * ## Definition and Usage The borderTopRightRadius property sets or returns the shape of the bottom-right border. **Tip:** This property allows you to add rounded corners to elements! * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) IE9+, Firefox, Chrome, Safari, and Opera support the borderTopRightRadius property. * * * ## Syntax Return the borderTopRightRadius property: _object_.style.borderTopRightRadius Set the borderTopRightRadius property: _object_.style.borderTopRightRadius="_length_|_%_ [_length_|_%_]|initial|inherit" **Note:** The length or percentage values of border-top-right-radius define the radii of a quarter ellipse that defines the shape of the corner of the outer border edge. The first value is the horizontal radius, the second value is the vertical radius. If the second value is omitted, it is copied from the first. If both lengths are zero, the corner is square, not rounded. The percentage for the horizontal radius is relative to the width of the border box, while the percentage for the vertical radius is relative to the height of the border box. ## Property Values | Value | Description | | --- | --- | | _length_ | Defines the shape of the top-right corner. | | _%_ | Defines the shape of the top-right corner in %. | | initial | Sets this property to its default value. See (#). | | inherit | Inherits this property from its parent element. See (#). | ## Technical Details | Default Value: | 0 | | --- | | Return Value: | A string, representing the border-top-right-radius property of an element. | | CSS Version | CSS3 | * * * ## Related Articles CSS Reference: (#) * * Style Object](#)
← Prop Style BoxshadowProp Style Bordertopleftradius β†’