CSS Tutorial

max-height and max-width Properties

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