Answer the question
In order to leave comments, you need to log in
How to stretch a block on Flexbox without touching the rest of the fixed ones?
Hello!
I have the following markup:
<style>
.container {
display: flex;
justify-content: space-between;
}
.fix {
width: 200px;
}
</style>
<div class="container">
<div class="fix"></div>
<div class="flex"></div>
<div class="fix"></div>
</div>
Answer the question
In order to leave comments, you need to log in
.container {
display: flex;
}
.flex {
flex: 1;
}
.fix {
flex: 0 200px;
}
Probably you still need to read at least one article about flexes and specifically about the flex property.
It's enough
.fix {
width: 200px;
flex: none;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question