# max-height

## introduce

Used to set the maximum height value for the element.

Elements with `max-height` defined will avoid further growing according to the `height` property after reaching the `max-height` value.

`max-height` overrides `height` setting, but `min-height` setting overrides `max-height`.

## grammar

````css
/* <length> */

max-height: 120px;

max-height: 10em;

/* <percentage> */

max-height: 75%;
````

### value

- `<length>`

Fixed maximum height. Negative values ​​invalidate the declaration.

- `<percentage>`

The maximum height is a percentage of the height of the parent block-level container.

### Standardized syntax

````css
max-height: <length> | <percentage>
````