Edit

max-height and max-width Properties

The max-height and max-width properties are represents the maximum height and width of the element. These properties are helpful to set the dimension of a box.

Example of Code

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <style>
      div {
        max-height: 150px;
        max-width: 75px;
        background-color: gold;
      }
    </style>
</head>
<body>
    <div>
        This div has 'max-height' and 'max-width' applied.
    </div>
</body>
</html>

Output

           
        This div has 'max-height' and 'max-width' applied.