You're developing a website where certain styles should only be applied to screens wider than 768px. How would you set this condition using media queries?

  • @media (min-width: 768px) { /* Styles go here */ }
  • @media (screen, min-width: 768px) { /* Styles go here */ }
  • @media screen (min-width: 768px) { /* Styles go here */ }
  • @media screen and (min-width: 768px) { /* Styles go here */ }
To create a media query for screens wider than 768px, you should use the @media rule, followed by the screen keyword (optional) and and (min-width: 768px). The correct option is @media screen and (min-width: 768px) { /* Styles go here */ }.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *