【发布时间】:2012-06-18 09:32:47
【问题描述】:
所以我正在尝试获取 2 个 div 容器,它们都应该包含居中的文本(x 轴和 y 轴)。
感谢 Google 和 stackoverflow,我偶然发现了一些与垂直对齐等有关的解决方法。但似乎没有任何效果。
#right-menu {
position: absolute ;
right: 0% ;
top: 0% ;
height: 100% ;
width: 5% ;
text-align: center ;
background: #ededed ;
display: table-cell;
vertical-align: middle ;
这是一个小提琴:
【问题讨论】: