I am writing a website with HTML and CSS. I just want a lot of div side by side.
This is my code
body {
margin: 0;
padding: 0;
font-family: "Roboto", sans-serif;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
background-color: #f6f6f6;
}
h1 {
margin: 10px;
}
.box {
color: #fff;
background-color: steelblue;
height: 2000px;
width: 300px;
padding: 20px;
display: flex;
align-items: center;
justify-content: center;
margin: 20px;
border-radius: 10px;
font-size: 20px;
box-shadow: 2px 4px 5px rgba(0, 0, 0, 0.3);
}
<body>
<h1>Scroll Animation</h1>
<div class="box">
<h2>content</h2>
</div>
<div class="box">
<h2>content</h2>
</div>
<div class="box">
<h2>content</h2>
</div>
</body>
when I change the height of box class, it does not work, but when I change the width property, it works. I change the flex-direction, the height property also does not work.
What is the problem? How can I get the height which I want? Please help me with this. Thanks a lot.