Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 1.05 KB

File metadata and controls

18 lines (16 loc) · 1.05 KB

HTML & CSS

Chapter 15: Layout

  • html elements treated as if theyre in their own box
  • treated as if block-level or inline
  • block-level - starts on new line
  • inline - flows between other content such as text
  • relative position - shifted relative to where it would be with normal positioning - can specify top, bottom, left, right
  • absolute position - positions element relative to its container, it wont impact the positions of its surrounding elements
  • fixed positioning - a form of relative positioning, element is positioned relative to the browser window instead of its containing element
  • floating - positions the element far left or right and flows content around the element
  • z-index (aka 'stacking context') - can be used to determin which element is positioned on top if boxes overlap
  • fixed-width layouts: dont change with size of browser window
  • liquid layouts: change with size of browser window
  • pages are usually designed with a width of 960-1000px
  • tell user what site is about in top 600px
  • grids are useful for making flexible page designs