min-height

Définit la hauteur minimale d’un élément.

Syntaxe

{ min-height: sMinHeight }

Valeurs possibles

sMinHeight

Variante qui spécifie la hauteur minimale d’un élément :

length

Nombre à virgule flottante suivi d’un indicateur d’unités absolues ( cm , mm , in , pt ou pc ) ou d’un indicateur d’unités relatives ( em , ex ou px ).

Pour plus d’informations sur les unités de longueur prises en charge, voir Référence des unités de longueur.

percentage

Nombre entier suivi d’un signe pourcentage (%) spécifiant un pourcentage de la hauteur du bloc conteneur à utiliser en tant que hauteur maximale de l’élément. Si la hauteur du bloc conteneur n’est pas explicitement définie, la hauteur maximale de l’élément n’est pas limitée et la propriété max-height est considérée comme égale à 0 % . Pour plus d’informations sur les blocs conteneurs et sur le mode de calcul de leur hauteur, voir la spécification Cascading Style Sheets (CSS), Level 2 (CSS2), Revision 1 (CSS2.1) (Feuilles de style en cascade (CSS), Niveau 2 (CSS2), Révision 1 (CSS2.1)) Ee371278.xtlink_newWindow(fr-fr,Expression.40).png.

La propriété n’a pas de valeur par défaut. Elle n’est pas héritée.

Exemples

L’exemple suivant montre les avantages de l’utilisation de la propriété min-height par rapport à la propriété height d’un élément TR :

<html>
<head><title>CSS Min-Height Property Example</title>
</head>
<body>
<table border ="1" style="table-layout:fixed; width:100%;">
  <tr>
    <td style="height:35px;background-color:#99CCFF">This cell has the
<strong>height</strong> property set to 35px. In Internet Explorer, overflow text
is clipped when <strong>height</strong> is set on the containing element.
Setting the <strong>min-height</strong> property, however, accomodates overflow text 
by increasing the element height.</td>
  </tr>
  <tr>
    <td style="min-height:35px;background-color:#99CCFF">This cell has the
<strong>min-height</strong> property set to 35px. In Internet Explorer, overflow text 
is clipped when <strong>height</strong> is set on the containing element.
Setting the <strong>min-height</strong> property, however, accomodates overflow text
by increasing the element height.</td>
  </tr>
</table>
</body>
</html>

Informations relatives aux normes

Cette propriété est définie dans Cascading Style Sheets (CSS), Level 2 (CSS2) (Feuilles de style en cascade (CSS), Niveau 2 (CSS2)) Ee371278.xtlink_newWindow(fr-fr,Expression.40).png.

Applicable à

a, abbr, acronym, b, bdo, big, blockquote, body, button, caption, center, cite, code, custom, dd, defaults, del, dfn, div, dl, dt, em, embed, fieldset, font, form, frameset, frame, hn, i, iframe, img, input type=button, input type=checkbox, input type=file, input type=image, input type=password, input type=radio, input type=reset, input type=submit, input type=text, ins, li, object, ol, p, q, s, span, sub, table, td, th, tt, u, ul, var, xmp

Voir aussi

Concepts

height
max-height
width
min-width
max-width