Skip to content

Instantly share code, notes, and snippets.

@tvpmb
Created November 13, 2012 20:58
Show Gist options
  • Select an option

  • Save tvpmb/4068347 to your computer and use it in GitHub Desktop.

Select an option

Save tvpmb/4068347 to your computer and use it in GitHub Desktop.
How to make responsive designs with code
Define all your page elements:
LAYOUT
-----------------------------------------------------------
Page Style?
- Fixed width responsive
- Dynamic width responsive
- Single page application (with internal scroll elements)
Header?
- Fixed top
- Page inline
Footer?
- Fixed bottom
- Page inline
Body Content
- Fixed layout (25/75, 33/66, 50/50, 100, Split-view vertical)
- Background color
ELEMENTS
-----------------------------------------------------------
Boxed in?
- Corner radius
- Box Background color
- Margin (outside the box - for layout spacing)
- Padding (inside the box - need to know otherwise full-width rows dont bleed to edges)
Box Header?
- Padding
- Font size or Icons (each requires different padding values, but font can make up for icon via line-height)
Box Footer?
- Padding
- Font size or Icons (each requires different padding values, but font can make up for icon via line-height)
FORMS
-----------------------------------------------------------
Input element sizes
Button Sizes
Horizontal Form Layout
Stacked Form Layout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment