Possible Duplicate:
css vertical centering
I'm trying to get text centered in a vertical tab on the side of the screen. So far I have the following CSS and HTML:
CSS
body
{
font-family: Arial;
}
.panel
{
position:absolute;
top: 0px;
bottom: 0px;
left: -300px;
width: 299px;
border-right: 1px solid black;
}
.tab
{
position: absolute;
top: 10px;
width: 16px;
right: -16px;
height: 75px;
border-top: 1px solid black;
border-bottom: 1px solid black;
border-right: 1px solid black;
cursor: default;
}
.tab div
{
position: relative;
display: block;
left: 1px;
width: 75px;
height: 15px;
font-size: 14px;
font-weight:normal;
line-height: 15px;
text-align: center;
-moz-transform:rotate(-270deg);
-moz-transform-origin: bottom left;
-webkit-transform: rotate(-270deg);
-webkit-transform-origin: bottom left;
-o-transform: rotate(-270deg);
-o-transform-origin: bottom left;
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
}
HTML
<div class="panel">
<div id="pnlStack" class="tab"><div>Name</div></div>
</div>
Everything look great in IE8 but in all other browsers I've tried (FF, Opera, Chrome) the text is not centered in the tab. how can I fix this so it works correctly?