.avatar { background-color: #cacaca; height: 240px; } .wall { background-color: #a9a9a9; height: 290px; } .frends { background-color: #cacaca; height: 240px; margin-top: 25px; } .row { clear:both; }
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <div class="container"> <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> </div>
When the height of the wall
block increases, the frends
block moves down, how can I leave the avatar
under the block clearly? (To paraphrase, I need to increase the height of the wall
block, the frends
block under the avatar
block.)
Supplement from the comments to the answers
I need frends
be pressed to avatar. Under the frends
will be another such block, and it should be pressed against the frends
. A wall
will automatically change the height.