Complete the code to set the viewport for responsive design.
<meta name="viewport" content="width=[1], initial-scale=1.0">
The device-width value tells the browser to match the screen width of the device, which is essential for responsive design.
Complete the CSS to make the container flexible for different screen sizes.
.container { display: [1]; }Using flex allows the container to adjust its items responsively across devices.
Fix the error in the media query to apply styles on small screens.
@media (max-width: [1]) { .menu { display: none; } }The media query requires units like px to work correctly. Just a number won't work.
Fill both blanks to create a responsive image that scales with its container.
<img src="photo.jpg" style="width: [1]; height: [2];">
Setting width to 100% makes the image fill its container's width, and height auto keeps the aspect ratio.
Fill all three blanks to create a responsive grid layout with two columns on large screens and one column on small screens.
@media (min-width: [1]) { .grid { display: [2]; grid-template-columns: [3]; } }
The media query activates at 768px and above. The grid container uses grid display to enable grid layout, and grid-template-columns defines two columns.