Answer the question
In order to leave comments, you need to log in
How to vertically align blocks in Bootstrap?
I edited the site, added Bootstrap. Everything seems to be fine, but the blocks are not aligned vertically. I decided to add flex-box, but as it turned out, flexes do not work with bootstrap (adaptability stops working).
Please tell me how to implement vertical alignment. Only I'm only interested in the bootstrap option. I have no desire to redo the layout because of one block.
The code is something like this:
<div class='container'>
<div class='row'>
<div class='col-lg-4 col-md-4 col-sm-4 col-xs-4'>loremloremloremloremloremloremloremloremloremloremloremloremlorem</div>
<div class='col-lg-4 col-md-4 col-sm-4 col-xs-4'>loremloremlorem</div>
<div class='col-lg-4 col-md-4 col-sm-4 col-xs-4'>loremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremlorem</div>
</div
</div>
Answer the question
In order to leave comments, you need to log in
<div class='container'>
<div class='row specific-block'>
...
</div
</div>
.specific-block {
display: flex;
align-items: center;
}
.specific-block {
>div {
display: table-cell;
vertical-align: center;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question