After a mandatory introduction and overview, it's time to see what can be achieved using media queries today – and where they fit our process as responsive designers and developers.
Turns out they are the most powerful weapon inside our arsenal. Let's see them together.
Using the regular, standard compliant syntax, we can set up custom rules, called break-points, in our standard CSS without additional sheets.
When the content encounters those rules – the most common one being tied to the dimension of the screen – the layout/behavior of your website/element will change accordingly.
Let's start with something simple:
body{ background-color: red; } @media only screen and (max-width: 500px) { body { background-color: lightblue; }}
This code – which can be written anywhere in your CSS – simply tells the browser to render the background in a light blue only when the screen is equal or less to 500px.
This is the situation when the page is first loaded:

And this...