I\'m trying to get vertical centering a block in IE7 (IE6 if possible too), let me get one thing clear - I\'m not vertically centering the actual element, but the text with
This is a known bug. The way to fix this, which may not be applicable in your situation, is to add a Float to the element and have it display as inline-block to make hasLayout work in IE. I will also supply FF2 hacks to get around issues there too.
Fixed code:
a {
display: inline-block;
display: -moz-inline-stack; /*FF2 Hack*/
zoom: 1; /*IE inline-block star hack*/
*display: inline; /*IE inline-block star hack*/
float: left;
width: 100px;
_height: 54px; /*FF2 Hack*/
background: black;
color: white;
text-align: center;
text-decoration: none;
margin: 0px auto;
}
Hello superlongword
I didn't add a float, because I figured with the other hacks being used, it wouldn't matter.