I think I'm misunderstanding something here. I want to have two children in my flex-container and give them equal space by setting each to flex-grow: 1
. But for some reason the one grows more than the other...
The code looks like this:
<body>
<div class="container">
<div id="chart">
<svg>
</svg>
</div>
<div id="description">description</div>
</div>
</body>
</html>
<style>
body,
html {
margin: 0
}
.container {
border: 1px solid black;
width: 80vw;
margin: 0 auto;
margin-top: 50vh;
transform: translateY(-50%);
display: flex;
position: relative;
}
.container>div {
border: 4px dashed gold;
flex-grow: 1;
}
svg {
width: 100%;
}
</style>
The result looks like this, but I would like to be both equal width.