--- title: border-left-width slug: Web/CSS/border-left-width tags: - CSS - Propriété - Reference translation_of: Web/CSS/border-left-width ---
La propriété border-left-width définit l'épaisseur de la bordure pour le côté gauche d'un élément.
Le code source de cet exemple interactif est disponible dans un dépôt GitHub. Si vous souhaitez contribuez à ces exemples, n'hésitez pas à cloner https://github.com/mdn/interactive-examples et à envoyer une pull request !
/* Une valeur de longueur */ /* Type <length> */ border-left-width: 10em; border-left-width: 3vmax; border-left-width: 6px; /* Valeurs avec un mot-clé */ border-left-width: thin; border-left-width: medium; border-left-width: thick; /* Valeurs globales */ border-left-width: inherit; border-left-width: initial; border-left-width: unset;
<br-width>thin |
|
Une bordure fine. |
medium |
|
Une bordure moyenne. |
thick |
|
Une bordure épaisse. |
thin ≤ medium ≤ thick et que ces valeurs soient constantes pour un même document..element1{
border-left-width: thick;
border-left-style: solid;
border-left-color: red;
}
.element2{
border-left-width: medium;
border-left-style: solid;
border-left-color: orange;
}
.element3{
border-left-width: thin;
border-left-style: solid;
border-left-color: green;
}
<p class="element1"> Une bordure épaisse rouge. </p> <p class="element2"> Une bordure moyenne orange. </p> <p class="element3"> Et une bordure fine verte. </p>
{{EmbedLiveSample("Exemples","200","300")}}
| Spécification | État | Commentaires |
|---|---|---|
| {{SpecName('CSS3 Backgrounds', '#the-border-width', 'border-left-width')}} | {{Spec2('CSS3 Backgrounds')}} | Pas de modification significative. |
| {{SpecName('CSS2.1', 'box.html#border-width-properties', 'border-left-width')}} | {{Spec2('CSS2.1')}} | Pas de modification significative. |
| {{SpecName('CSS1', '#border-left-width', 'border-left-width')}} | {{Spec2('CSS1')}} | Définition initiale. |
{{cssinfo}}
{{Compat("css.properties.border-left-width")}}