--- title: clear slug: Web/CSS/clear tags: - Referencia_CSS translation_of: Web/CSS/clear ---

{{ CSSRef() }}

Resumo

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.

Sintaxe

clear: none | left | right | both | inherit

Valores

Exemplos

View Live Examples

h1 { clear: none }
h2 { clear: right }

Notas

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.

Especificações

Compatibilidade com navegadores

Navegador Versão mais antiga
Internet Explorer 4
Firefox 1
Netscape 4
Mozilla 1

Veja também

{{ Cssxref("float") }}, {{ Cssxref("clear") }}

Categorias

Interwiki Language Links

{{ languages( { "en": "en/CSS/clear", "fr": "fr/CSS/clear", "pl": "pl/CSS/clear" } ) }}