--- title: clear slug: Web/CSS/clear tags: - Referencia_CSS translation_of: Web/CSS/clear ---
{{ CSSRef() }}
A propriedadeclear especifica se um elemento deve ser posicionado ao lado dos elementos flutuantes ou se devem ser colocados abaixo deles, "forçando" os elementos com float para cima.
clear: none | left | right | both | inherit
h1 { clear: none } h2 { clear: right }
The clear property applies to both floating and non-floating elements.
When it applies to non-floating blocks, it moves the border edge of the element down until it is below the margin edge of all relevant floats. This movement (when it happens) causes margin collapsing not to occur.
When it applies to floating elements, it moves the margin edge of the element below the margin edge of all relevant floats. This affects the position of later floats, since later floats cannot be positioned higher than earlier ones.
The floats that are relevant to be cleared are the earlier floats within the same block formatting context.
Navegador | Versão mais antiga |
---|---|
Internet Explorer | 4 |
Firefox | 1 |
Netscape | 4 |
Mozilla | 1 |
{{ Cssxref("float") }}, {{ Cssxref("clear") }}
Categorias
Interwiki Language Links
{{ languages( { "en": "en/CSS/clear", "fr": "fr/CSS/clear", "pl": "pl/CSS/clear" } ) }}