HTML/CSS/Box Model/min width

Материал из Web эксперт
Перейти к: навигация, поиск

min-width:700px

   <source lang="html4strict">

<!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"> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style> body{

   background:#ccc;
   text-align:center;

}

  1. outer{
 width:80%;
 background:#aaa;
 margin:auto;
 text-align:left;
 position:relative;
 min-width:700px;
 border:1px solid #ccc;

} h1{

   text-align:center;

} p{

  padding:10px;
  margin:0 0 1em 0;

} </style> </head> <body>

This is the title

this is a test. this is a test. this is a test. this is a test.

This is the content : this is the content : <p>This is the content : this is the content : his is the content : this is the content : this is the content : this is the content :

</body> </html>

</source>
   
  


width: auto; min-width: 200px

   <source lang="html4strict">

<!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: thin solid black;
           width: auto;
           min-width: 200px;
       }
           </style>
       </head>
       <body>

This is a test. This is a test.

       </body>
   </html>
</source>