diff --git a/README.md b/README.md index 067cd10..cd7657d 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The term “mobile first” gets thrown around a lot lately. What it really mean ##Min-width Media Queries Introduce layout-specific rules only when you need them. Use `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 of the stylesheet or in a separate document. -``` +```css /* Small screens (default) */ html { font-size: 100%; } @@ -37,20 +37,20 @@ html { font-size: 100%; } ####1. Not All Browsers are Created Equal Browsers will render your CSS differently. To avoid this, it’s a good idea to use a modern alternative to a reset like [Normalize.css](http://necolas.github.io/normalize.css/), which will render elements more consistently cross-browser. Remember to include it as-is before your stylesheet. -``` - - +```html + + ``` ####2. Add the Viewport Meta Tag Place in the `
` of your HTML. This enables use of media queries for cross-device layouts. -``` +```html ``` ####3. Use box-sizing: border-box Place at the top of your CSS file. The `*` will target all elements on the page. -``` +```css *, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; @@ -60,7 +60,7 @@ Place at the top of your CSS file. The `*` will target all elements on the page. ####4. Create a Container A container holds all elements and controls the page's maximum width. Using a container will make designing for responsive easier! -``` +```css .container { margin: 0 auto; max-width: 48rem; @@ -68,7 +68,7 @@ A container holds all elements and controls the page's maximum width. Using a co } ``` -``` +```html