Presented by David Myers and Zackary Lowery at Town Hack Columbus 2014
This presentation is available online at https://townhack.github.io/rwd-101/#/
Responsive Web Design: The practice of designing flexible layouts that are adaptable to any device, any viewport, or even to any environment.
* This example will only work in the Firefox Web Browser
There are too many devices and screen sizes to predict every possible outcome
Desktop no longer dominates the realm of web browsers
Media Queries allow you to test the device for certain properties...
...and use the results to help change the layout or style with CSS.
body {
background-color: #ddd;
}
@media all and (min-width: 50rem) {
body {
background-color: #444;
}
}
Screens less than 50rem wide will have a light background.
Screens 50rem or wider will have a dark background.
Inside a CSS file or Style block
@media all and (min-width: 50rem) {
body {
background-color: #444;
}
}
Inside the link tag
In combination with the @import statement
@import url('large.css') all and (min-width: 50rem);