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

<style>
      #example-max-height-and-max-width-Properties-div{
        max-height: 150px;
        max-width: 75px;
        background-color: gold;
      }
    </style>
</head>
<body>
<div id="example-max-height-and-max-width-Properties-div">
     This div has 'max-height' and 'max-width' applied.
</div>

Output

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