How to make blocks of the same width? It is necessary that the blocks fill the entire width of the screen, and started from the left edge.
It turns out only that the last block occupies the entire width. The last seventh block should not fill the entire width, it should be like the first six, while it should be responsive. I need to use only flexbox, media queries and scripts will not work for me.
=
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
html, body {
height: 100%;
background: #000000;
}
header,
footer {
background-color: #ffffff;
padding: 20px;
}
ul {
display: flex;
flex-wrap: wrap;
list-style: none;
padding: 5px;
}
li {
width: 350px;
flex-grow: 1;
padding: 20px;
margin: 3px;
border-radius: 5px;
background-color: #1b6351;
}
.wrapper {
display: flex;
flex-direction: column;
height: 100%;
}
.container {
flex: 1 0 auto;
}
footer {
flex: 0 0 auto;
}
<!DOCTYPE html>
<html>
<body>
<div class="wrapper">
<header>top</header>
<div class="container">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
</ul>
</div>
<footer>bottom</footer>
</div>
</body>
</html>