我想知道如何对齐我的文本在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