0
を使用してdiv要素を揃えることができません:垂直ここに私の基本的なHTMLですフレキシボックス
<div class="col-lg-12">
<div class="col-lg-4 center-block main-text center-text marg-small boxed">
<div class="random">Some Text</div>
<div class="col-lg-6 marg-small ">
<div id="pick_channel" class="boxed orange">
<div class="square vertical">Channel</div>
</div>
<div id="pick_objective" class="boxed orange">
<div class="square vertical">Objective</div>
</div>
</div>
</div>
</div>
し、関連するCSS:
.boxed{
display:flex;
flex-direction: column;
flex-wrap:nowrap;
align-items: center;
}
.square {
height:100px;
width:100%;
display:flex;
align-self:center;
margin-bottom: 10px;
}
.vertical{
}
私はid
のpick_channel
とpick_objective
長方形などで終わるしようとしています"Channel"と "Objective"のテキストはそれぞれ縦横に中心を持ってdivs
となります。私はたくさんの組み合わせを試しましたが、それを理解できません。
ありがとう!これはほぼ完璧です。どのように私の 'col-lg-4' div内のボックスをこの「上」の中心に合わせるには? – jonmrich
ok私は今それが変わったように見えるが、ブートストラップのクラスではうまくいくはずだ –