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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
---
title: min-height
slug: Web/CSS/min-height
translation_of: Web/CSS/min-height
---
<p>{{ CSSRef() }}</p>
<h2 id="Summary" name="Summary">Sumário</h2>
<p>A propriedade <code>min-height</code> do CSS é usado para definir a altura mínima de um determinado elemento. Ele impede que o valor usado da propriedade {{ Cssxref("height") }} se torne menor que o valor especificado para min-height.<br>
O valor de {{ Cssxref("min-height") }} substitui os dois {{ Cssxref("max-height") }} e {{ Cssxref("height") }}.</p>
<p>{{cssinfo}}</p>
<h2 id="Syntax" name="Syntax"><span id="ouHighlight__0_5TO0_6">Sintaxe</span></h2>
<pre class="twopartsyntaxbox"><a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">sintaxe forma</a>: {{csssyntax("min-height")}}
</pre>
<pre>min-height: 3.5em
min-height: 10%
min-height: max-content
min-height: min-content
min-height: fit-content
min-height: fill-available
min-height: inherit
</pre>
<h3 id="Values" name="Values">Valores</h3>
<dl>
<dt><code><length></code></dt>
<dd>O valor fixo mínimo da altura. Veja {{cssxref("<length>")}} para possíveis unidades. Valores negativos fazem da declaração inválida.</dd>
<dt><code><percentage></code></dt>
<dd>O valor fixo mínimo da altura expressado como uma {{cssxref("<percentage>")}} do conteúdo da altura do bloco. Valores negativos fazem da declaração inválida.</dd>
<dt><code>max-content</code> {{ experimental_inline() }}</dt>
<dd>The intrinsic preferred height.</dd>
<dt><code>min-content</code> {{ experimental_inline() }}</dt>
<dd>The intrinsic minimum height.</dd>
<dt><code>fill-available</code>{{ experimental_inline() }}</dt>
<dd>The containing block height minus horizontal margin, border and padding. Some browsers implement an ancient name for this keyword, <code>available</code>.</dd>
<dt><code>fit-content</code> {{ experimental_inline() }}</dt>
<dd>According CSS3 Box, this is a synonym of <code>min-content.</code> CSS3 Sizing defines a more complex algorithm, but no browser implements it, even in an experimental way.</dd>
</dl>
<h2 id="Examples" name="Examples">Exemplos</h2>
<pre class="brush: css">table { min-height: 75%; }
form { min-height: 0; }
</pre>
<h2 id="Especificações">Especificações</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Especificação</th>
<th scope="col">Status</th>
<th scope="col"><span id="ouHighlight__0_6TO0_9">Comentário</span></th>
</tr>
<tr>
<td>{{ SpecName('CSS3 Sizing', '#width-height-keywords', 'min-height') }}</td>
<td>{{ Spec2('CSS3 Sizing') }}</td>
<td>Adds the <code>max-content</code>, <code>min-content</code>, <code>fit-content</code>, and <code>fill-available</code> keywords.<br>
<em>Both CSS3 Box and CSS3 Writing Modes drafts defined at some point these keywords. These drafts are superseded by this spec.</em></td>
</tr>
<tr>
<td>{{ SpecName('CSS3 Flexbox', '#min-auto', 'min-height') }}</td>
<td>{{ Spec2('CSS3 Flexbox') }}</td>
<td>An <a href="http://www.w3.org/TR/2012/CR-css3-flexbox-20120918/">earlier revision of the spec</a> added the <code>auto</code> keyword and used it as the initial value. The CSSWG subsequently resolved to revert this change, however. As of March 29, 2013, the latest <a href="http://dev.w3.org/csswg/css-flexbox/">Editor's Draft</a> doesn't modify the <code>min-width</code> property anymore (i.e. it no longer introduces the <code>auto</code> value).</td>
</tr>
<tr>
<td>{{ SpecName('CSS3 Transitions', '#animatable-css', 'min-height') }}</td>
<td>{{ Spec2('CSS3 Transitions') }}</td>
<td>Defines <code>min-height</code> as animatable.</td>
</tr>
<tr>
<td>{{ SpecName('CSS2.1', 'visudet.html#min-max-heights', 'min-height') }}</td>
<td>{{ Spec2('CSS2.1') }}</td>
<td>Initial definition.</td>
</tr>
</tbody>
</table>
<h2 id="Navegadores_compatíveis">Navegadores compatíveis</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Chrome</th>
<th>Firefox (Gecko)</th>
<th>Internet Explorer</th>
<th>Opera</th>
<th>Safari (WebKit)</th>
</tr>
<tr>
<td>Basic support</td>
<td>1.0</td>
<td>{{ CompatGeckoDesktop("1.9") }}</td>
<td>7.0</td>
<td>4.0</td>
<td>1.0<br>
2.0.2 (416) for positioned elements</td>
</tr>
<tr>
<td>applies to <code><table> </code>[1]</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>{{ CompatNo() }}</td>
</tr>
<tr>
<td><code>max-content</code>, <code>min-content</code>, <code>fit-content</code>, and <code>fill-</code><code>available</code> {{ experimental_inline() }}</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatNo() }}</td>
</tr>
<tr>
<td><code>auto</code>{{obsolete_inline(22)}}</td>
<td>21.0</td>
<td>{{ CompatGeckoDesktop("16.0") }}</td>
<td>{{ CompatNo() }}</td>
<td>12.10</td>
<td>{{ CompatNo() }}</td>
</tr>
<tr>
<td><code>auto</code> as initial value{{obsolete_inline(22)}}</td>
<td>21.0</td>
<td>{{ CompatGeckoDesktop("18.0") }}</td>
<td>{{ CompatNo() }}</td>
<td>12.10</td>
<td>{{ CompatNo() }}</td>
</tr>
</tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Android</th>
<th>Firefox Mobile (Gecko)</th>
<th>IE Phone</th>
<th>Opera Mobile</th>
<th>Safari Mobile</th>
</tr>
<tr>
<td>Basic support</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
</tr>
</tbody>
</table>
</div>
<h3 id="Notas">Notas</h3>
<p>[1] CSS 2.1 explicitly leaves the behavior of <code>min-height </code>with {{ HTMLElement("table") }} undefined. Therefore any behavior is CSS2.1-compliant; newer CSS specifications may define this behavior, so Web developers shouldn't rely on a specific one now.</p>
<p>[2] Due to bug ({{bug("307866")}}) Firefox doesn't hande <code>min-height</code> on elements with <code>display: table-*</code>.</p>
<h2 id="See_also" name="See_also">Ver também</h2>
<ul>
<li>{{ Cssxref("width") }}, {{ Cssxref("height") }}, {{ Cssxref("max-height") }}</li>
<li>The <a href="/en-US/docs/CSS/box_model" title="en/CSS/box_model">box model</a>, {{ Cssxref("min-width") }}, {{ Cssxref("box-sizing") }}, {{ Cssxref("height") }}, {{ Cssxref("max-height") }}</li>
</ul>
|