Create a responsive grid layout where items rearrange based on screen size using only CSS.
HardProblem Statement
Create a responsive grid layout where items rearrange based on screen size using only CSS.
Sample Output
The items rearrange into a grid layout of two columns on larger screens and one column on smaller screens.
Limits
Time: 2s · Memory: 256 MB
Code Editor
Log in to submit00:00
Try your code in this preview. Submit marks it done.
<!DOCTYPE html>
<html>
<head>
<style>
/* Add CSS here to create the responsive grid layout */
</style>
</head>
<body>
<div class="grid">
<div class="item">1</div>
<div class="item">2</div>
<div class="item">3</div>
<div class="item">4</div>
<div class="item">5</div>
<div class="item">6</div>
</div>
</body>
</html>
Document
To view the HTML changes, please type the code within the editor