Search notes:

CSS: margin property

1 to 4 values

The margin property can be set to 1 through 4 values, each of which is separated by white spaces.
Depending on the number of values given, they specify:
#elem_1  {     /* Margin with four values:   */
  margin:  5px /*   top                      */
           7px /*   right                    */
           6px /*   bottom                   */
           4px /*   left                     */
}

#elem_2  {     /* Margin with three values:  */
  margin:  5px /*   top                      */
           7px /*   right, left              */
           6px /*   bottom                   */
}

#elem_3  {     /* Margin with two values     */
  margin:  5px /*   top, bottom              */
           6px /*   left, right              */
}

#elem_4  {     /* Margin with one value      */
  margin:  5px /*   top, bottom, left, right */
}

Margin-collapsing

No collapsing occurs for elements that are

See also

The padding and border properties
The influence of margin-top on the HTML element <ul>.
The CSS box model
More CSS properties

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759414223, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/web/CSS/properties/margin/index(79): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78