border-right-style

  • Revision slug: CSS/border-right-style
  • Revision title: border-right-style
  • Revision id: 355977
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{ CSSRef() }}

Summary

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

The specification doesn't define how borders of different style connect in the corners.
  • {{ Xref_cssinitial() }} {{ Cssinitial("border-left-style") }}
  • Applies to all elements
  • {{ Xref_cssinherited() }} no
  • Media {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }} as specified

Syntax

Formal syntax: {{csssyntax("border-left-style")}}
border-right-style: none
border-right-style: hidden
border-right-style: dotted
border-right-style: dashed
border-right-style: solid
border-right-style: double
border-right-style: groove
border-right-style: ridge
border-right-style: inset
border-right-style: outset

border-right-style: inherit

Values

border-style
Is a keyword describing the style of the bottom border. It can have the following values:
none
 
Like for the hidden keyword, displays no border. In that case, except if a background image is set, the calculated values of {{ cssxref("border-right-width") }} will be 0, even if specified otherwise through the property. In case of table cell and border collapsing, the none value has the lowest priority: it means that if any other conflicting border is set, it will be displayed.
hidden
 
Like for the none keyword, displays no border. In that case, except if a background image is set, the calculated values of {{ cssxref("border-right-width") }} will be 0, even if specified otherwise through the property. In case of table cell and border collapsing, the hidden value has the highest priority: it means that if any other conflicting border is set, it won't be displayed.
dotted
 
Displays a series of rounded dots. The spacing of the dots are not defined by the specification and are implementation-specific. The radius of the dots is half the calculated {{ cssxref("border-right-width") }}.
dashed
 
Displays a series of short square-ended dashes or line segments. The exact size and length of the segments are not defined by the specification and are implementation-specific.
solid
 
Displays a single, straight, solid line.
double
 
Displays two straight lines that add up to the pixel amount defined as {{ cssxref("border-width") }} or {{ cssxref("border-right-width") }}.
groove
 
Displays a border leading to a carved effect. It is the opposite of ridge.
ridge
 
Displays a border with a 3D effect, like if it is coming out of the page. It is the opposite of groove.
inset
 
Displays a border that makes the box appear embedded. It is the opposite of outset. When applied to a table cell with {{ cssxref("border-collapse") }} set to collapsed, this value behaves like groove.
outset
 

Displays a border that makes the box appear in 3D, embossed. It is the opposite of inset. When applied to a table cell with {{ cssxref("border-collapse") }} set to collapsed, this value behaves like ridge.

inherit

  Represents the border style used by the parent of the current element.

Examples

element {
        border-right-size: 1px;
        border-right-style: dotted;
        border-right-color: #000;
}

Specifications

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

Browser Compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 1.0 5.5 9.2 1.0
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See Also

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

{{ languages( { "de": "de/CSS/border-right-style", "fr": "fr/CSS/border-right-style", "ja": "ja/CSS/border-right-style", "pl": "pl/CSS/border-right-style", "pt": "pt/CSS/border-right-style" } ) }} 

Revision Source

<p>{{ CSSRef() }}</p>
<h2 id="Summary" name="Summary">Summary</h2>
<p>The <code>border-right-style</code> <a href="/en/CSS" title="CSS">CSS</a> property sets the line style of the right border of a box.</p>
<div class="note">
  The specification doesn't define how borders of different style connect in the corners.</div>
<ul class="cssprop">
  <li><dfn>{{ Xref_cssinitial() }}</dfn> {{ Cssinitial("border-left-style") }}</li>
  <li><dfn>Applies to</dfn> all elements</li>
  <li><dfn>{{ Xref_cssinherited() }}</dfn> no</li>
  <li><dfn>Media</dfn> {{ Xref_cssvisual() }}</li>
  <li><dfn>{{ Xref_csscomputed() }}</dfn> as specified</li>
</ul>
<h2 id="Syntax" name="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox">
<a href="/en-US/docs/CSS/Value_definition_syntax" title="/en-US/docs/CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("border-left-style")}}
</pre>
<pre>
border-right-style: none
border-right-style: hidden
border-right-style: dotted
border-right-style: dashed
border-right-style: solid
border-right-style: double
border-right-style: groove
border-right-style: ridge
border-right-style: inset
border-right-style: outset
<em>
</em>border-right-style: inherit
</pre>
<h3 id="Values">Values</h3>
<dl>
  <dt>
    <em>border-style</em></dt>
  <dd>
    Is a keyword describing the style of the bottom border. It can have the following values:
    <table class="standard-table">
      <tbody>
        <tr>
          <td style="vertical-align:middle;"><code>none</code></td>
          <td style="vertical-align:middle;">
            <div style="margin:0.5em; width:3em; height:3em; border-right-style:none; background-color:palegreen;">
              &nbsp;</div>
          </td>
          <td style="vertical-align:middle;">Like for the <code>hidden</code> keyword, displays no border. In that case, except if a background image is set, the calculated values of {{ cssxref("border-right-width") }} will be <code>0</code>, even if specified otherwise through the property. In case of table cell and border collapsing, the <code>none</code> value has the lowest priority: it means that if any other conflicting border is set, it will be displayed.</td>
        </tr>
        <tr>
          <td style="vertical-align:middle;"><code>hidden</code></td>
          <td style="vertical-align:middle;">
            <div style="margin:0.5em; width:3em; height:3em; border-right-style:hidden; background-color:palegreen;">
              &nbsp;</div>
          </td>
          <td style="vertical-align:middle;">Like for the <code>none</code> keyword, displays no border. In that case, except if a background image is set, the calculated values of {{ cssxref("border-right-width") }} will be <code>0</code>, even if specified otherwise through the property. In case of table cell and border collapsing, the <code>hidden</code> value has the highest priority: it means that if any other conflicting border is set, it won't be displayed.</td>
        </tr>
        <tr>
          <td style="vertical-align:middle;"><code>dotted</code></td>
          <td style="vertical-align:middle;">
            <div style="margin:0.5em; width:3em; height:3em; border-right-style:dotted; background-color:palegreen;">
              &nbsp;</div>
          </td>
          <td style="vertical-align:middle;">Displays a series of rounded dots. The spacing of the dots are not defined by the specification and are implementation-specific. The radius of the dots is half the calculated {{ cssxref("border-right-width") }}.</td>
        </tr>
        <tr>
          <td style="vertical-align:middle;"><code>dashed</code></td>
          <td style="vertical-align:middle;">
            <div style="margin:0.5em; width:3em; height:3em; border-right-style:dashed; background-color:palegreen;">
              &nbsp;</div>
          </td>
          <td style="vertical-align:middle;">Displays a series of short square-ended dashes or line segments. The exact size and length of the segments are not defined by the specification and are implementation-specific.</td>
        </tr>
        <tr>
          <td style="vertical-align:middle;"><code>solid</code></td>
          <td style="vertical-align:middle;">
            <div style="margin:0.5em; width:3em; height:3em; border-right-style:solid; background-color:palegreen;">
              &nbsp;</div>
          </td>
          <td style="vertical-align:middle;">Displays a single, straight, solid line.</td>
        </tr>
        <tr>
          <td style="vertical-align:middle;"><code>double</code></td>
          <td style="vertical-align:middle;">
            <div style="margin:0.5em; width:3em; height:3em; border-right-style:double; background-color:palegreen;">
              &nbsp;</div>
          </td>
          <td style="vertical-align:middle;">Displays two straight lines that add up to the pixel amount defined as {{ cssxref("border-width") }} or {{ cssxref("border-right-width") }}.</td>
        </tr>
        <tr>
          <td style="vertical-align:middle;"><code>groove</code></td>
          <td style="vertical-align:middle;">
            <div style="margin:0.5em; width:3em; height:3em; border-right-style:groove; background-color:palegreen;">
              &nbsp;</div>
          </td>
          <td style="vertical-align:middle;">Displays a border leading to a carved effect. It is the opposite of <code>ridge</code>.</td>
        </tr>
        <tr>
          <td style="vertical-align:middle;"><code>ridge</code></td>
          <td style="vertical-align:middle;">
            <div style="margin:0.5em; width:3em; height:3em; border-right-style:ridge; background-color:palegreen;">
              &nbsp;</div>
          </td>
          <td style="vertical-align:middle;">Displays a border with a 3D effect, like if it is coming out of the page. It is the opposite of <code>groove</code>.</td>
        </tr>
        <tr>
          <td style="vertical-align:middle;"><code>inset</code></td>
          <td style="vertical-align:middle;">
            <div style="margin:0.5em; width:3em; height:3em; border-right-style:inset; background-color:palegreen;">
              &nbsp;</div>
          </td>
          <td style="vertical-align:middle;">Displays a border that makes the box appear embedded. It is the opposite of <code>outset</code>. When applied to a table cell with {{ cssxref("border-collapse") }} set to <code>collapsed</code>, this value behaves like <code>groove</code>.</td>
        </tr>
        <tr>
          <td style="vertical-align:middle;"><code>outset</code></td>
          <td style="vertical-align:middle;">
            <div style="margin:0.5em; width:3em; height:3em; border-right-style:outset; background-color:palegreen;">
              &nbsp;</div>
          </td>
          <td style="vertical-align:middle;">
            <p>Displays a border that makes the box appear in 3D, embossed. It is the opposite of <code>inset</code>. When applied to a table cell with {{ cssxref("border-collapse") }} set to <code>collapsed</code>, this value behaves like <code>ridge</code>.</p>
          </td>
        </tr>
      </tbody>
    </table>
  </dd>
  <dt>
    inherit</dt>
</dl>
<p>&nbsp; Represents the border style used by the parent of the current element.</p>
<h2 id="Examples">Examples</h2>
<pre class="brush:css; highlight:[3]">
element {
        border-right-size: 1px;
        border-right-style: dotted;
        border-right-color: #000;
}
</pre>
<h2 id="Specifications" name="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-style', 'border-right-style') }}</td>
      <td>{{ Spec2('CSS3 Backgrounds') }}</td>
      <td>No significant change.</td>
    </tr>
    <tr>
      <td>{{ SpecName('CSS2.1', 'box.html#border-style-properties', 'border-right-style') }}</td>
      <td>{{ Spec2('CSS2.1') }}</td>
      <td>Initial definition.</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_Compatibility" name="Browser_Compatibility">Browser Compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<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</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>1.0</td>
        <td>1.0</td>
        <td>5.5</td>
        <td>9.2</td>
        <td>1.0</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&nbsp;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" name="See_Also">See Also</h2>
<ul>
  <li>The other style-related border properties: {{ Cssxref("border-bottom-style") }}, {{ Cssxref("border-left-style") }}, {{ Cssxref("border-top-style") }}, and {{ Cssxref("border-style") }}.</li>
  <li>The other bottom-border-related properties: {{ Cssxref("border-right") }}, {{ Cssxref("border-right-color") }}, and {{ Cssxref("border-right-width") }}.</li>
</ul>
<p>{{ languages( { "de": "de/CSS/border-right-style", "fr": "fr/CSS/border-right-style", "ja": "ja/CSS/border-right-style", "pl": "pl/CSS/border-right-style", "pt": "pt/CSS/border-right-style" } ) }}&nbsp;</p>
Revert to this revision