Skip to Navigation
< Return to Ferrigan Design Websites Page

Lesson 12 Final Exam Project

Layouts Cheatsheet

Box Model

position:
static /* default, positioned according to the normal flow of the page and not affected by the top, bottom, left, and right properties */
relative /* enables an element to be positioned relative to where it would have originally been on a web page */
absolute /* removes an element entirely from the document flow; can be used with top, left, bottom, and right to position anywhere as expected */
fixed /* set/pinned to a specific spot on a page, regardless of scrolling */
box-sizing:
border-box /* corresponds directly to the element's total rendered size, including padding and border with the height and width properties */
margin: (margin-top, margin-right, margin-bottom, margin-left)
auto /* the browser calculates the margin */
length /* specifies a margin in px, pt, cm, etc. */
% /* specifies a margin in % of the width of the containing element */
inherit /* specifies that the margin is inherited from the parent element */
border:
border-width /* specifies the width of the four borders */
border-style /* specifies what kind of border to display */
border-color /* sets the color of the four borders */
padding: (padding-top, padding-right, padding-bottom, padding left)
length /* specifies a margin in px, pt, cm, etc. */
% /* specifies a margin in % of the width of the containing element */
inherit /* specifies that the margin is inherited from the parent element */