我想知道如何對齊我的文本在div中。垂直對齊文本在流體div
我試過像display: inline block;
這樣的東西,但它沒有幫助。 我的容器實際上是整個窗口的10%高度。
請參閱下面的代碼,引用div是「droite」。
https://jsfiddle.net/5zh9qgnw/
.droite{
width: 73%;
height: 100%;
float:right;
background-color: #232200;
text-align: center;
color: white;
}
.gauche{
width: 27%;
text-align: center;
float: left;
background-color: #afafaf;
}
#aszone, #gzone{
margin-left: 20px;
margin-right: 20px;
height: 10%;
text-align:center;
background-color: black;
background-size: cover;
}
Nod確實不好..但如何對齊這兩個div(gauche和droite),使它們位於div「gzone」的垂直中間位置? – Ezhno