Hello, i've lost half of my hair in 2 days, sorry for my english :)
If you resize the window the buttons in #header go outside of his container.
Here is the code:
#root {
background: grey;
display: flex;
flex-direction: column;
align-items: center;
}
#header {
background: red;
align-self: stretch; /* fill in main-axis */
flex: 0 0 65px; /* fixed height */
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
}
<div id="root">
<div id="header">
<button>PUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUSH</button>
<button>BYE.</button>
</div>
<----- resize me ---->
</div>
I think the problem is #root.width is leaded by window/body.width ?
I have a solution with min-content:
#root { min-width: min-content; ... }
, but i don't want use this value.
How configure #root correctly acting as a good and beautiful container for my layout ?
Here is a codepen for playing: https://codepen.io/papawa/pen/NLKbKR