max-height and min-height : max height « CSS « HTML / CSS






max-height and min-height

  

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
  <title>max-height and min-height</title>
<style type='text/css'>
div {min-height:150px; 
   max-height:200px;
   padding:5px;
   border:1px solid #000000;}
</style>

</head>

<body>

<div>This is a test.</div>

</body>
</html>

   
    
  








Related examples in the same category

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