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


  • submit to reddit
        From <a href=></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

  <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
  <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*/
  <div class="layer1">
   <big>Lorem ipsum dolor sit amet</big>
  <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.