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






max-width and min-width

  


<?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-width and min-width</title>
<style type='text/css'>
div {min-width:200px; 
   max-width:500px;
   padding:5px;
   border:1px solid #000000;}
</style>

</head>

<body>

<div>max-width and min-width properties are very useful because they allow you to create boxes that can change in size.</div>

</body>
</html>

   
    
  








Related examples in the same category

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