this is my first time working with Flexboxes in HTML. I watched some tutorials and everything seemed to be fairly easy. Now I just wanted to create a small html page using flexboxes to practice it. Right after I started I ran into a problem and I have googled for about an hour now and I can't find anyone mentioning this problem. I have a container flex box that contains 3 more divs. I want them to be displayed below each other and set a size, but if I set "flex-direction:column;" they will adjust their size according to how much text they contain and they don't seem to use the properties I set in my styles.css. If I set "flex-direction:row;" I can change their size using the flex attribute.
Here is my code:
<body>
<div class="container-1">
<div class="box-1">
<span id="title">Titel der notification</span>
<br>
<br>
<span class="validTime">Empfangen: October 9, 2018 3:40 PM</span><br>
<span class="validTime">Gültig bis: Oct 10, 2019, 3:40 PM</span>
<div style="display:flex">
<hr style="width:100%; margin-left:30px; margin-right:30px; margin-top:5px">
</div>
</div>
<div class="box-2">
<p style="margin-left:30px">Nachricht.. blablablabla</p>
</div>
<div class="box-3">
<div style="display:flex">
<hr style="width:100%; margin-left:30px; margin-right:30px; margin-top:5px">
</div>
<span>Verantwortlicher Michael</span><br>
<span>Verantwortliche Rolle: IT-Administration</span>
</div>
</div>
</body>
CSS:
.container-1{
display:flex;
flex-direction:column;
}
.box-1{
flex:60;
}
.box-2{
flex:20;
}
.box-3{
flex:20;
}
Please keep answers simple, I am fairly new to web development.
Thanks in advance!