--- title: max-height slug: Web/CSS/max-height tags: - CSS - 'CSS:Referencias' - Todas_las_Categorías translation_of: Web/CSS/max-height --- <p> </p> <p><< <a href="es/Gu%c3%ada_de_referencia_de_CSS">Volver</a></p> <h3 id="Resumen" name="Resumen">Resumen</h3> <p>La propiedad <code>max-height</code> se utiliza para definir la altura máxima de un elemento dado. Impide que el valor de la {{ Cssxref("height", "altura") }} pueda llegar a ser más grande que la de <code>max-height</code>.</p> <ul> <li>{{ Cssxref("initial", "Valor inicial") }}: {{ Cssxref("none", "ninguno") }}</li> <li>Se aplica a : elementos de bloque o remplazados</li> <li>{{ Cssxref("inheritance", "Valor heredado") }}: no</li> <li>Porcentajes: se refiere a la altura del bloque contenedor.</li> <li>Medio: {{ Xref_cssvisual() }}</li> <li>{{ Cssxref("computed value", "Valor calculado") }}:</li> </ul> <h3 id="Sintaxis" name="Sintaxis">Sintaxis</h3> <pre class="eval">max-height: <length> | <percentage> </pre> <h3 id="Valores" name="Valores">Valores</h3> <ul> <li><strong>none</strong> : la {{ Cssxref("height", "altura") }} no tiene valor máxima.</li> <li><strong>length</strong> : puede ser en px, cm, in (píxel, centímetro o inches)</li> <li><strong>percentage</strong> : % especificado como un porcentaje de la altura del bloque contenedor.</li> </ul> <h3 id="Ejemplos" name="Ejemplos">Ejemplos</h3> <pre class="eval">table { max-width: 75%; } form { max-width: none; } </pre> <h3 id="Notas" name="Notas">Notas</h3> <p>{{ Cssxref("max-height") }} sobrescribe {{ Cssxref("height") }}, pero <strong>no</strong> {{ Cssxref("min-height") }}.</p> <h3 id="Especificaciones" name="Especificaciones">Especificaciones</h3> <ul> <li><a class="external" href="http://www.w3.org/TR/CSS2/visudet.html#min-max-heights">CSS 2.1</a></li> </ul> <h3 id="Compatibilidades" name="Compatibilidades">Compatibilidades</h3> <table class="standard-table"> <tbody> <tr> <th>Navegador</th> <th>Versión mínima</th> </tr> <tr> <td>Internet Explorer</td> <td>6</td> </tr> <tr> <td>Netscape</td> <td>6</td> </tr> <tr> <td>Opera</td> <td>3.5</td> </tr> </tbody> </table> <h3 id="Ver_tambi.C3.A9n" name="Ver_tambi.C3.A9n">Ver también</h3> <p>{{ Cssxref("Modelo de caja", "modelo de caja") }}, {{ Cssxref("width", "ancho") }}, {{ Cssxref("-moz-box-sizing", "tamaño de cajas -Mozilla") }}, {{ Cssxref("min-height", "altura mínima") }}, {{ Cssxref("max-height", "altura máxima") }}</p> <p> </p> <div class="noinclude"> <p><span class="comment">Categorías</span></p> <p><span class="comment">Interwiki Languages</span></p> <div class="noinclude"> </div> </div> <p>{{ languages( { "en": "en/CSS/max-height", "fr": "fr/CSS/max-height" } ) }}</p>