mozilla

Revision 494045 of border-right-width

  • Revision slug: Web/CSS/border-right-width
  • Revision title: border-right-width
  • Revision id: 494045
  • Created:
  • Creator: kscarfone
  • Is current revision? No
  • Comment Updated tags

Revision Content

{{CSSRef("CSS Borders")}}

Summary

The border-right-width CSS property sets the width of the right border of a box.

{{cssbox("border-right-width")}}

Syntax

Formal syntax: {{csssyntax("border-right-width")}}
border-right-width: 10em    /* Any <length> value */
border-right-width: 3vmax
border-right-width: 6px

border-right-width: thin    /* A keyword */
border-right-width: medium
border-right-width: thick

border-right-width: inherit

Values

<br-width>
Is either a non-negative explicit {{xref_csslength}} value or a keyword denoting the thickness of the right border. The keyword must be one of the following values:
thin
 
A thin border
medium
 
A medium border
thick
 
A thick border
The specification doesn't define precisely the thickness of each fo the keywords, which is therefore implementation specific. Nevertheless, it requests that the thickness does follow the rule thin ≤ medium ≤ thick, and is constant on a single document.
inherit
Represents the calculated value of the border-right-width of the parent's element.

Examples

Here is the live example :

http://jsfiddle.net/mCQ4X/

Specifications

Specification Status Comment
{{SpecName('CSS3 Backgrounds', '#the-border-width', 'border-right-width')}} {{Spec2('CSS3 Backgrounds')}} No significant change.
{{SpecName('CSS2.1', 'box.html#border-width-properties', 'border-right-width')}} {{Spec2('CSS2.1')}} Initial definition.

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 1.0 (1.0) 4.0 3.5 1.0 (85)
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}

See also

  • The other border-width-related CSS properties: {{Cssxref("border-bottom-width")}}, {{Cssxref("border-left-width")}}, {{Cssxref("border-top-width")}}, and {{Cssxref("border-width")}}
  • The other border-right-related CSS properties: {{Cssxref("border")}}, {{Cssxref("border-right")}}, {{Cssxref("border-right-style")}}, and {{Cssxref("border-right-color")}}.

Revision Source

<div>
 {{CSSRef("CSS Borders")}}</div>
<h2 id="Summary">Summary</h2>
<p>The <code>border-right-width</code> <a href="/en-US/docs/CSS" title="CSS">CSS</a> property sets the width of the right border of a box.</p>
<p>{{cssbox("border-right-width")}}</p>
<h2 id="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox">
<a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("border-right-width")}}
</pre>
<pre>
border-right-width: 10em    /* Any &lt;length&gt; value */
border-right-width: 3vmax
border-right-width: 6px

border-right-width: thin    /* A keyword */
border-right-width: medium
border-right-width: thick

border-right-width: inherit
</pre>
<h3 id="Values">Values</h3>
<dl>
 <dt>
  <code>&lt;br-width&gt;</code></dt>
 <dd>
  Is either a non-negative explicit {{xref_csslength}} value or a keyword denoting the thickness of the right border. The keyword must be one of the following values:
  <table class="standard-table">
   <tbody>
    <tr>
     <td style="vertical-align:middle;"><code>thin</code></td>
     <td style="vertical-align:middle;">
      <div style="margin:0.5em; width:3em; height:3em; border-right-style:solid; border-right-width:thin; background-color:palegreen;">
       &nbsp;</div>
     </td>
     <td style="vertical-align:middle;">A thin border</td>
    </tr>
    <tr>
     <td style="vertical-align:middle;"><code>medium</code></td>
     <td style="vertical-align:middle;">
      <div style="margin:0.5em; width:3em; height:3em; border-right-style:solid; border-right-width:medium; background-color:palegreen;">
       &nbsp;</div>
     </td>
     <td style="vertical-align:middle;">A medium border</td>
    </tr>
    <tr>
     <td style="vertical-align:middle;"><code>thick</code></td>
     <td style="vertical-align:middle;">
      <div style="margin:0.5em; width:3em; height:3em; border-right-style:solid; border-right-width:thick; background-color:palegreen;">
       &nbsp;</div>
     </td>
     <td style="vertical-align:middle;">A thick border</td>
    </tr>
   </tbody>
  </table>
  The specification doesn't define precisely the thickness of each fo the keywords, which is therefore implementation specific. Nevertheless, it requests that the thickness does follow the rule&nbsp;<code>thin ≤ medium ≤ thick</code>, and is constant on a single document.</dd>
 <dt>
  <code>inherit</code></dt>
 <dd>
  Represents the calculated value of the <code>border-right-width</code> of the parent's element.</dd>
</dl>
<h2 id="Examples">Examples</h2>
<p>Here is the live example :</p>
<p><a href="http://jsfiddle.net/mCQ4X/" style="line-height: 1.572;">http://jsfiddle.net/mCQ4X/</a></p>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSS3 Backgrounds', '#the-border-width', 'border-right-width')}}</td>
   <td>{{Spec2('CSS3 Backgrounds')}}</td>
   <td>No significant change.</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS2.1', 'box.html#border-width-properties', 'border-right-width')}}</td>
   <td>{{Spec2('CSS2.1')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<div>
 {{CompatibilityTable}}</div>
<div id="compat-desktop">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Chrome</th>
    <th>Firefox (Gecko)</th>
    <th>Internet Explorer</th>
    <th>Opera</th>
    <th>Safari (WebKit)</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>1.0</td>
    <td>1.0 (1.0)</td>
    <td>4.0</td>
    <td>3.5</td>
    <td>1.0 (85)</td>
   </tr>
  </tbody>
 </table>
</div>
<div id="compat-mobile">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Android</th>
    <th>Firefox Mobile (Gecko)</th>
    <th>IE Phone</th>
    <th>Opera Mobile</th>
    <th>Safari Mobile</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{CompatUnknown}}</td>
    <td>{{CompatUnknown}}</td>
    <td>{{CompatUnknown}}</td>
    <td>{{CompatUnknown}}</td>
    <td>{{CompatUnknown}}</td>
   </tr>
  </tbody>
 </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
 <li>The other border-width-related CSS properties: {{Cssxref("border-bottom-width")}}, {{Cssxref("border-left-width")}}, {{Cssxref("border-top-width")}}, and {{Cssxref("border-width")}}</li>
 <li>The other border-right-related CSS properties: {{Cssxref("border")}}, {{Cssxref("border-right")}}, {{Cssxref("border-right-style")}}, and {{Cssxref("border-right-color")}}.</li>
</ul>
Revert to this revision