Propriété CSS bottom
Exemple
Définissez le bord inférieur de l'élément <div> à 10 pixels au-dessus du bord inférieur de son élément parent le plus proche avec un certain positionnement :
div.absolute {
position: absolute;
bottom:
10px;
width: 50%;
border: 3px solid #8AC007;
}
Définition et utilisation
La bottom
propriété affecte la position verticale d'un élément positionné. Cette propriété n'a aucun effet sur les éléments non positionnés.
- Si position : absolue ; ou poste : fixe ; - la
bottom
propriété définit le bord inférieur d'un élément sur une unité au-dessus/en dessous du bord inférieur de son ancêtre positionné le plus proche. - Si poste : relatif ; - la
bottom
propriété fait que le bord inférieur de l'élément se déplace au-dessus/en dessous de sa position normale. - Si position : collante ; - la
bottom
propriété se comporte comme sa position est relative lorsque l'élément est à l'intérieur de la fenêtre, et comme sa position est fixe lorsqu'il est à l'extérieur. - Si position : statique ; - la
bottom
propriété n'a aucun effet.
Valeur par défaut: | auto |
---|---|
Hérité: | non |
Animable : | Oui. En savoir plus sur l'animation |
Version: | CSS2 |
Syntaxe JavaScript : | objet .style.bottom="10px" |
Prise en charge du navigateur
Les nombres dans le tableau indiquent la première version du navigateur qui prend entièrement en charge la propriété.
Property | |||||
---|---|---|---|---|---|
bottom | 1.0 | 5.0 | 1.0 | 1.0 | 6.0 |
Syntaxe CSS
bottom: auto|length|initial|inherit;
Valeurs de propriété
Value | Description | Play it |
---|---|---|
auto | Lets the browser calculate the bottom edge position. This is default | |
length | Sets the bottom edge position in px, cm, etc. Negative values are allowed. Read about length units | |
% | Sets the bottom edge position in % of containing element. Negative values are allowed | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Pages connexes
Tutoriel CSS : Positionnement CSS
Référence CSS : propriété top
Référence CSS : propriété gauche
Référence CSS : propriété right
Référence HTML DOM : propriété bottom