Propriété de style borderSpacing
Exemple
Définissez l'espace entre les cellules d'un tableau :
document.getElementById("myTable").style.borderSpacing = "20px";
Définition et utilisation
La propriété borderSpacing définit ou renvoie l'espace entre les cellules d'un tableau.
Remarque : Cette propriété n'a aucun effet si borderCollapse est défini sur Réduire.
Prise en charge du navigateur
Property | |||||
---|---|---|---|---|---|
borderSpacing | Yes | 9.0 | Yes | Yes | Yes |
Syntaxe
Renvoyez la propriété borderSpacing :
object.style.borderSpacing
Définissez la propriété borderSpacing :
object.style.borderSpacing = "length length|initial|inherit"
Valeurs de propriété
Value | Description |
---|---|
length length | Specifies the space between cells in length units. Negative values are not allowed. Default value is 0.
|
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Détails techniques
Valeur par défaut: | 0 |
---|---|
Valeur de retour : | Une chaîne, représentant l'espace entre les cellules d'un tableau |
Version CSS | CSS2 |
Plus d'exemples
Exemple
Renvoie l'espace entre les cellules d'un tableau :
alert(document.getElementById("myTable").style.borderSpacing);
Pages connexes
Tutoriel CSS : Tableau CSS
Référence CSS : propriété border-spacing
❮ Objet de style