diff --git a/grid.css b/grid.css index cd6235f..be24187 100644 --- a/grid.css +++ b/grid.css @@ -340,6 +340,25 @@ img { .row-example .row { padding: 1rem 0 0 0; } } +.gutters { + border: 2px dashed #eee; + margin-bottom: 2rem; + max-width: 39rem; + padding: 1rem 1rem 0 1rem; +} + +.gutters .column { + background: #fb917e; + margin-bottom: 1rem; +} + +.gutters span { + background: #f8f8f8; + color: #999; + display: block; + padding: 1rem 0; +} + /* Box Model ========================================================================== */ @@ -356,7 +375,7 @@ img { .gist .gist-file { font-size: .9rem !important; margin: 0 auto; - max-width: 750px; + max-width: 39rem; overflow: hidden !important; text-align: left; } diff --git a/index.html b/index.html index f45751a..b1ae599 100644 --- a/index.html +++ b/index.html @@ -18,12 +18,12 @@ - +
A simple guide to responsive design.
Made by Adam Kaplan.
We want our websites to be useable on all devices by responding to
@@ -46,16 +46,16 @@
As of 2013, there are thousands
+ As of 2013, there are thousands
of different devices and screen sizes that browse the internet, so it’s impossible to design layouts to target them
all. Instead, we must take a more fluid approach to design. The term “mobile first” gets thrown around a lot lately. What it really means is to start with mobile
styles and layer on styles optimized for larger screens only as needed. In other words, your mobile styles become
@@ -77,7 +77,7 @@
Introduce layout-specific rules only when you need them. Use Browsers will render your CSS differently. To avoid this, it’s a good idea to use a modern
@@ -100,7 +100,7 @@
Place in the Place at the top of your A container holds all elements and controls the page’s maximum width. Using a container will make designing for
@@ -203,7 +203,7 @@
With mobile first, columns are On larger screens, columns gain Columns are wrapped in rows to prevent other elements from stacking next to them, otherwise known as clearing
@@ -345,7 +360,7 @@
Add the class By following these simple steps, you are on the path to responsive
web design mastery. Keep practicing and help make the web a better,
@@ -391,7 +406,7 @@
A Fragmented World
- Mobile First
Min-width Media Queries
min-width to layer complexity on your
layout as the viewport widens. It’s easier to have all the media queries nearby, rather than at the end
@@ -88,7 +88,7 @@
Not All Browsers are Created Equal
Add the Viewport Meta Tag
<head> of your HTML. This enables use of media queries for cross-device layouts.Use box-sizing: border-box
CSS file. The * will target all elements on the page.Create a Container
Create a Column
block level (takes up the full width available) by default. No
@@ -234,12 +234,27 @@
Create Column Sizes
float: left in order to stack content horizontally. Columns now
use padding for gutters, so you no longer need to worry about removing margins.
+ Create Rows
Flow Opposite
.flow-opposite to columns where you want content to display first on mobile but
appear on the right on larger screens.Practice Makes Perfect