--- title: border-right slug: Web/CSS/border-right tags: - Bordes CSS - Propiedad CSS - Referencia translation_of: Web/CSS/border-right --- <div>{{CSSRef}}</div> <p><span class="seoSummary">La propiedad <a href="/en-US/docs/Web/CSS">CSS</a> <strong><code>border-right</code></strong> es un a propiedad rápida para dar valores al {{cssxref("border-right-width")}}, {{cssxref("border-right-style")}} y {{cssxref("border-right-color")}}.</span> Estas propiedades establecen un <a href="/es/docs/Web/CSS/border">borde </a>derecho del elemento.</p> <div>{{EmbedInteractiveExample("pages/css/border-right.html")}}</div> <p>Como con todas las propiedades rápidas, <code>border-right</code> siempre establece los valores de todas las propiedades que puede establecer, incluso si no están especificadas. Establece los no especificados a sus valores por defecto. Lo que significa que ...</p> <pre class="brush: css">border-right-style: dotted; border-right: thick green; </pre> <p>... es en realidad lo mismo que ...</p> <pre class="brush: css">border-right-style: dotted; border-right: none thick green; </pre> <p>... y el valor de {{cssxref("border-right-style")}} dado previamente a <code>border-right</code> es ignorado. Puesto que el valor por defecto de {{cssxref("border-right-style")}} es <code>none</code>, si no se especifica la parte <code>border-style</code> el resultado es no establecer un borde.</p> <h2 id="Sintaxis">Sintaxis</h2> <pre class="brush: css no-line-numbers">border-right: 1px; border-right: 2px dotted; border-right: medium dashed green; </pre> <p>Los tres valores de la propiedad rápida pueden ser especificados en cualquier orden, incluso omitiendo uno o dos de ellos.</p> <h3 id="Valores">Valores</h3> <dl> <dt><code><br-width></code></dt> <dd>Ver {{cssxref("border-right-width")}}.</dd> <dt><code><br-style></code></dt> <dd>Ver {{cssxref("border-right-style")}}.</dd> <dt>{{cssxref("<color>")}}</dt> <dd>Ver {{cssxref("border-right-color")}}.</dd> </dl> <h3 id="Formal_syntax">Formal syntax</h3> <pre class="syntaxbox">{{csssyntax}}</pre> <h2 id="Ejemplo">Ejemplo</h2> <pre class="brush: html"><div> Esta caja tiene un borde en el lado derecho. </div></pre> <pre class="brush: css">div { border-right: 4px dashed blue; background-color: gold; height: 100px; width: 100px; font-weight: bold; text-align: center; } </pre> <p>{{EmbedLiveSample('Example')}}</p> <h2 id="Specifications" name="Specifications">Especificaciones</h2> <table class="standard-table"> <thead> <tr> <th scope="col">Especificación</th> <th scope="col">Estado</th> <th scope="col">Comentario</th> </tr> </thead> <tbody> <tr> <td>{{SpecName('CSS3 Backgrounds', '#border-right', 'border-right')}}</td> <td>{{Spec2('CSS3 Backgrounds')}}</td> <td>No direct changes, though the modification of values for the {{cssxref("border-right-color")}} do apply to it.</td> </tr> <tr> <td>{{SpecName('CSS2.1', 'box.html#propdef-border-right', 'border-right')}}</td> <td>{{Spec2('CSS2.1')}}</td> <td>No significant changes.</td> </tr> <tr> <td>{{SpecName('CSS1', '#border-right', 'border-right')}}</td> <td>{{Spec2('CSS1')}}</td> <td>Initial definition</td> </tr> </tbody> </table> <div>{{cssinfo}}</div> <h2 id="Browser_compatibility" name="Browser_compatibility">Compatibilitidad del navegador</h2> <div class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</div> <p>{{Compat("css.properties.border-right")}}</p>