Dynamic grid

Report a typo

Create a grid with a dynamic number of columns based on the available space, where each column has a fixed width of 50 pixels.

Write HTML and CSS code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Example</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="grid-container">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
<div class="grid-item">3</div>
<div class="grid-item">4</div>
<div class="grid-item">5</div>
<div class="grid-item">6</div>
</div>
</body>
</html>
Completed 1 of 2
Auto-fill available space, each column has a fixed width of 50 pixels. 
The code is valid
___

Create a free account to access the full topic