Answer the question
In order to leave comments, you need to log in
How to make the block not move in boostrap block layout?
<div class="row">
<div class="col-sm-4">
<div class="avatar"></div>
</div>
<div class="col-sm-8">
<div class="wall"></div>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="frends"></div>
</div>
<div class="col-sm-8"></div>
<div class="col-sm-4"></div>
</div>
</div>
.avatar {
background-color: #cacaca;
height: 240px;
}
.wall {
background-color: #a9a9a9;
height: 240px;
}
.frends {
background-color: #cacaca;
height: 240px;
margin-top: 25px;
}
Answer the question
In order to leave comments, you need to log in
1. you shouldn't use row so often unnecessarily, 1 would be enough for you, but push pull cannot jump through it.
2. As a matter of fact, in some cases, a banal clearfix helps
in your case, there are several options. You can simply replace your row classes with col-xs-12 and throw a common row on top of them in such a case there will be a separator between them.
If you have an adaptive there and the number of columns changes, then there is also a way. but it was not in
<div class="row">
<div class="col-sm-12">
<div class="col-sm-4">
<div class="avatar"></div>
</div>
<div class="col-sm-8">
<div class="wall"></div>
</div>
</div>
<div class="col-sm-12">
<div class="col-sm-4">
<div class="frends"></div>
</div>
<div class="col-sm-8"></div>
<div class="col-sm-4"></div>
</div>
</div>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question