Monday 2 January 2012

CSS layout: the box model


  • Each element is a box.
  • Default width: maximum that fits into the parent element.
  • Default height: minimum that fits in all the children elements.
    • %: Defines the height in percent of the containing block.


  • Inline elements can share a line. Examples: <em>, <strong>, <input>, <select>, <img>. They have no margins or paddings.



No comments :

Post a Comment