DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Serg has posted 8 posts at DZone. View Full User Profile

Margin-bottom

09.08.2010
| 2312 views |
  • submit to reddit
        From <a href=http://phpforms.net/tutorial/tutorial.html>http://phpforms.net/tutorial/tutorial.html</a>

It determines an indentation size from the bottom margin of an element. A space is the distance from external margin of the current element bottom margin to internal margin of its parental element

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
  <title>margin-bottom</title>
  <style type="text/css">
   .layer1 {
    background: #008B66; /* Background color */
    color: white;  /* Text color */
    padding: 10px;  /* Areas around the text */
    margin-bottom: -7px; /* Bottom margin */
   }
   .layer2 {
    margin-left: 40px;  /* Left margin */
    background: #ccc;  /* Background color */
    padding: 10px; /* Areas around the text*/
   }
  </style>
 </head> 
 <body> 
 
  <div class="layer1">
   <big>Lorem ipsum dolor sit amet</big>
  </div> 
 
  <div class="layer2">
   Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem nonummy nibh 
   euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. Ut wisis enim 
   ad minim veniam, quis nostrud exerci tution ullamcorper suscipit lobortis nisl 
   ut aliquip ex ea commodo consequat. 
  </div>
 
 </body>
</html>