Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

CSS Dictionary

  1. Home
  2. CSS Dictionary
  3. border-right-width

border-right-width

Specifies the width of the right border.

Sample Code

style.css
/* thin keyword (generally 1px) */
div.test { border-right-width: thin;}

/* medium keyword (default, generally 3px) */
div.test1 { border-right-width: medium;}

/* thick keyword (generally 5px) */
div.test2 { border-right-width: thick;}

/* Exact pixel value */
div.test3 { border-right-width: 10px;}

/* Hide the border */
div.test4 { border-right-width: 0;}

/* border-right-style must also be set to make it visible */
.right-border {
	border-right-style: solid;
	border-right-width: 3px;
	border-right-color: #ccc;
	padding-right: 12px;
}

Available Values

ValueDescription
NumberSpecifies the border width using a unit such as 'px'.
thinUses the keyword 'thin'. Most browsers render this as 1px, though it may vary slightly by browser.
mediumUses the keyword 'medium'. Most browsers render this as 3px, though it may vary slightly by browser. This is the initial value when no 'border-right-width' is specified.
thickUses the keyword 'thick'. Most browsers render this as 5px, though it may vary slightly by browser.

Browser Preview

※ The 'border-style' property in the sample below is set to 'solid'.

<div style="border-right-width: 10px; border-style: solid; height: 100px; padding: 10px; font-weight: bold;">A div element with height 100px and padding 10px.</div>

Browser Compatibility

Chrome Chrome
1+
Firefox Firefox
1+
Safari Safari
1+
Edge Edge
12+
IE IE
11
10
9
8
7
6
Opera Opera
3.5+
2 and below ×
iOS Safari iOS Safari
1+
Android Android Browser
2.2+
1 and below ×
Chrome Android Chrome Android
Latest
Same support as desktop
Firefox Android Firefox Android
Latest
Same support as desktop

※ Version information is based on MDN.

If you find any errors or copyright issues, please .