Answer the question
In order to leave comments, you need to log in
How to wrap a block in flexbox?
Goodnight! I ran into an interesting problem.
I am writing a template on bootstrap3, respectively, I apply the class of this framework.
It is required to create 3 columns, one twice as large as the others if required...
Initially the code is:
<div class="wrapper-item">
<div class="container">
<div class="main-block">
<div class="left-item">
<ul>
<li>Пункт меню</li>
</ul>
</div>
<div class="center-item">
<ul>
<li>Пункт меню</li>
</ul>
</div>
<div class="right-item">
<ul>
<li>Пункт меню</li>
</ul>
</div>
</div>
</div>
</div>
.main-block {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
align-items: baseline;
height: 350px;
}
.left-item {
flex: 2 1 auto;
}
.center-item {
flex: 1 2;
}
.right-item {
flex: 1 2;
}
.left-item ul {
height: 350px;
display: flex;
-ms-align-items: stretch;
align-items: baseline;
flex-direction: column;
align-content: baseline;
flex-wrap: wrap;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question