Complete the code to apply styles only on screens smaller than 600px.
@media (max-width: [1]) {
body {
background-color: lightblue;
}
}The max-width media feature applies styles when the screen width is less than or equal to the specified value. Here, 600px means styles apply on screens smaller than 600 pixels wide.
Complete the code to apply styles only on screens wider than 768px.
@media (min-width: [1]) { p { font-size: 1.2rem; } }
max-width instead of min-width changes the target screens.The min-width media feature applies styles when the screen width is greater than or equal to the specified value. Here, 768px targets tablets and larger devices.
Fix the error in the media query syntax to target screens between 600px and 900px.
@media (min-width: 600px) and ([1]: 900px) { div { display: flex; } }
min-height or max-height instead of width features.min-width twice causes the query to fail.To target screens between two widths, use min-width and max-width. Here, max-width: 900px sets the upper limit.
Fill both blanks to create a media query that applies styles only on screens between 480px and 768px wide.
@media ([1]: 480px) and ([2]: 768px) { h1 { color: darkgreen; } }
Use min-width for the lower limit and max-width for the upper limit to target screens between two widths.
Fill all three blanks to create a media query that applies styles on screens wider than 1024px, with a minimum height of 700px, and in landscape orientation.
@media ([1]: 1024px) and ([2]: 700px) and (orientation: [3]) { nav { background-color: navy; } }
max-width instead of min-width for the first blank.min-height with max-height.This media query uses min-width for width, min-height for height, and orientation: landscape to target wide, tall screens in landscape mode.