Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 1.94 KB

File metadata and controls

29 lines (23 loc) · 1.94 KB

CSS Structure & Layout

First, some general concepts:

  • As far as CSS is concerned, every HTML element that shows up on the page is a box (a rectangle).
  • When thinking of a page layout, it's helpful to break the page into components. Every element has it's own internal layout, so instead of worrying how to get every individual element on the page to where you want it to go, instead think of how to arrange a group of elements together into a rectangle. Then you can treat that entire rectangle as a unit to be arranged on the page.

There are a ton of important CSS attributes, but for the purposes of layout, there's one that rules them all: the display attribute. Specifically, the values of the display attribute that I recommend you understand are (in this order):

Other attributes that are important to layouts within an element or on the page overall:

Recommended exercises

Helpful references

Other resources