Tsallaka zuwa abun ciki
Justice Tech School

Responsive Pages and Media Queries

The viewport meta tag plus media queries adapt layout to screen size. Design small screens first, then add rules for wider screens with min-width.

Example
<style>
  .box { background: #0f766e; padding: 10px }
  @media (min-width: 600px) { .box { background: #b45309 } }
</style>
<div class="box">Green on small screens, orange on wide screens</div>

Exercise

Wide screens rule.

@media (min-: 600px)

Quiz Test

What is mobile first?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.