CSS box model

In this lesson we will look at the famous ‘box model’ of CSS. This is a fundamental principle to understand - once you are happy with this concept - you’ll see that things will become easier :)

lesson content

  • understanding the CSS box model
  • working with positioning
  • setting up site navigation
  • basic list styling

lesson notes

  • understand your layout as a collection of boxes - boxes within boxes
  • use width in combination with margin and padding to set up spacing between the different HTML elements
  • DIVs should be use to divide content into meaningful chunks, not used as ‘quick fixes’ for layout reasons
  • understand all standard HTML tags as boxes in themselves
  • class and IDs can be assigned to a DIV tag as well as most other HTML tags
  • lists should be used where suitable to display content
  • site menus are almost always best set up using lists
  • for horizontal menus - use: “display: inline;” in your CSS (applied to the list item)

1 Comment »

  1. I have not finished reading these texts …

    Comment by Constanza Martinez — June 12, 2008

Leave a comment