Propriété claire CSS
Exemple
L'élément <p> est placé sous les éléments flottants à gauche (l'élément <p> n'autorise pas les éléments flottants à gauche) :
img
{
float: left;
}
p.clear
{
clear: left;
}
Définition et utilisation
La clear
propriété contrôle le flux à côté des éléments flottants.
La clear
propriété spécifie ce qui doit se passer avec l'élément qui est à côté d'un élément flottant.
Astuce : Regardez aussi la propriété.
float
Valeur par défaut: | rien |
---|---|
Hérité: | non |
Animable : | non. En savoir plus sur l'animation |
Version: | CSS1 |
Syntaxe JavaScript : | objet .style.clear="les deux" |
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 | |||||
---|---|---|---|---|---|
clear | 1.0 | 5.0 | 1.0 | 1.0 | 6.0 |
Syntaxe CSS
clear: none|left|right|both|initial|inherit;
Valeurs de propriété
Value | Description |
---|---|
none | Default. The element is not pushed below left or right floated elements |
left | The element is pushed below left floated elements |
right | The element is pushed below right floated elements |
both | The element is pushed below both left and right floated elements |
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 : flottant CSS
Référence HTML DOM : propriété clear