max-height: 200px : max height « CSS « HTML / CSS






max-height: 200px

   
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   <html>
        <head>
            <title></title>
            <style type='text/css'>
        p {
            padding: 10px;
            margin: 10px;
            border:  1px solid black;
            background: lightgray;
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            max-height: 200px;
        }
            </style>
        </head>
        <body>
      <p>
this is a test. this is a test. this is a test. this is a test. 
this is a test. this is a test. this is a test. this is a test. 
this is a test. this is a test. this is a test. this is a test. 
this is a test. this is a test. this is a test. this is a test. 
      </p>
        </body>
    </html>

   
    
  








Related examples in the same category

1.max height
2.max-height: 50px;
3.max-width and min-width
4.max-height and min-height
5.max-width, min-width,max-height