aboutsummaryrefslogtreecommitdiff
path: root/files/pt-pt/web/css/clear/index.html
blob: 8fcfd728ca5cfe7d92317a880339211cc0a83f94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
title: clear
slug: Web/CSS/clear
tags:
  - Referencia_CSS
translation_of: Web/CSS/clear
---
<p>{{ CSSRef() }}</p>

<h3 id="Resumo" name="Resumo">Resumo</h3>

<p>A propriedade<em>clear</em> especifica se um elemento deve ser posicionado ao lado dos elementos <a href="pt/CSS/float">flutuantes</a> ou se devem ser colocados abaixo deles, "forçando" os elementos com float para cima.</p>

<ul>
 <li>Valor inicial: nenhum;</li>
 <li>Aplica-se a: elementos de bloco de nível (incluindo flutuantes);</li>
 <li>Herdado: não;</li>
 <li>Mídia: <a href="pt/CSS/Media/Visual">Visual</a></li>
</ul>

<h3 id="Sintaxe" name="Sintaxe">Sintaxe</h3>

<p>clear: none | left | right | both | <a href="pt/CSS/inherit">inherit</a></p>

<h3 id="Valores" name="Valores">Valores</h3>

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

<h3 id="Exemplos" name="Exemplos">Exemplos</h3>

<p><a href="/samples/cssref/clear.html">View Live Examples</a></p>

<pre>h1 { clear: none }
h2 { clear: right }</pre>

<h3 id="Notas" name="Notas">Notas</h3>

<p>The clear property applies to both floating and non-floating elements.</p>

<p>When it applies to non-floating blocks, it moves the <a href="pt/CSS/box_edges">border edge</a> of the element down until it is below the <a href="pt/CSS/box_edges">margin edge</a> of all relevant floats. This movement (when it happens) causes <a href="pt/CSS/margin_collapsing">margin collapsing</a> not to occur.</p>

<p>When it applies to floating elements, it moves the <a href="pt/CSS/box_edges">margin edge</a> of the element below the <a href="pt/CSS/box_edges">margin edge</a> of all relevant floats. This affects the position of later floats, since later floats cannot be positioned higher than earlier ones.</p>

<p>The floats that are relevant to be cleared are the earlier floats within the same <a href="pt/CSS/block_formatting_context">block formatting context</a>.</p>

<h3 id="Especifica.C3.A7.C3.B5es" name="Especifica.C3.A7.C3.B5es">Especificações</h3>

<ul>
 <li><a class="external" href="http://www.w3.org/TR/REC-CSS1#clear">CSS 1</a></li>
 <li><a class="external" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-clear">CSS 2.1</a></li>
</ul>

<h3 id="Compatibilidade_com_navegadores" name="Compatibilidade_com_navegadores">Compatibilidade com navegadores</h3>

<table class="standard-table">
 <tbody>
  <tr>
   <th>Navegador</th>
   <th>Versão mais antiga</th>
  </tr>
  <tr>
   <td>Internet Explorer</td>
   <td>4</td>
  </tr>
  <tr>
   <td>Firefox</td>
   <td>1</td>
  </tr>
  <tr>
   <td>Netscape</td>
   <td>4</td>
  </tr>
  <tr>
   <td>Mozilla</td>
   <td>1</td>
  </tr>
 </tbody>
</table>

<h3 id="Veja_tamb.C3.A9m" name="Veja_tamb.C3.A9m">Veja também</h3>

<p>{{ Cssxref("float") }}, {{ Cssxref("clear") }}</p>

<p><span class="comment">Categorias</span></p>

<p><span class="comment">Interwiki Language Links</span></p>

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