Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

clear

Resumo

A propriedade clear 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.

  • Valor inicial: nenhum;
  • Aplica-se a: elementos de bloco de nível (incluindo flutuantes);
  • Herdado: não;
  • Mídia: Visual

Sintaxe

clear: none | left | right | both | inherit

Valores

  • none : O elemento não é abaixado para o espaço livre após elementos flutuantes.
  • left : O elemento é movido abaixo dos elementos que estão com float a esquerda.
  • right : O elemento é movido abaixo dos elementos que estão com float a direita.
  • both : O elemento é abaixado para o espaço livre após elementos flutuando à esquerda e à direita. Both signifca Ambos.

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

float, clear

Categorias

Interwiki Language Links

Etiquetas do documento e colaboradores

Etiquetas: 
 Colaboradores para esta página: teoli, Luis Henrique Sousa, Verruckt
 Última atualização por: teoli,