我想讓我的div2居中對齊,並使div3位於右側。如何使用CSS創建1 div中心對齊和其他浮動權利
我想這樣做,與文本對齊:中心主格,使浮動權DIV3但考慮主div的其餘部分使其中心對齊。我已經給顯示:內聯-FLEX主DIV
<div style="height: 40px;width:120px;background-color: yellow;align-items: center;">
<div style="height: 20px;width:20px;background-color: red;">
Hello
</div>
<div style="height: 20px;float: right;width:20px;background-color: red;">
</div>
</div>
我們需要代碼。請告訴我們你到目前爲止所嘗試過的。 –
設置div的寬度,當你需要在div中心 –
訪問下面的代碼我昨天回答[http://stackoverflow.com/questions/43450161/how-can-i-add-3-columns-in-an-html- page-using-css/43450339#43450339] –