So i am trying get 2 div-containers which both should contain centered text (Both x- and y-axis).
Thanks to Google and stackoverflow, i stumbled over a few workarounds which play with vertical-align etc. But nothing seems to work.
#right-menu {
position: absolute ;
right: 0% ;
top: 0% ;
height: 100% ;
width: 5% ;
text-align: center ;
background: #ededed ;
display: table-cell;
vertical-align: middle ;
Here is a fiddle:
Vertical-align:middleproperty is not used withposition:absolute;if you are using vertical-align:middle then try this layout modified layouthttp://jsfiddle.net/7Rgvs/5/