vertical alignment issue compatibility mode IE

996 Views Asked by At

I'm having a strange problem while building up the structure for a web site. Basically I have:

.container(height:30px;line-height:30px;)

in which I have few links (font-size:14px) that I want vertical-aligned to the middle of my div.everything is fine,i switched the compatibility views button on IE and everything is still ok. the problem is if i change the font size to 12px and i switch the compatibility view my links are not vertical-aligned anymore!

Im testing on IE8

why is this happening? what-s the solution?

thanks luca

1

There are 1 best solutions below

0
On

You might have found the solution but in case you don't,

I had the same problem with vertical-align in IE8. The easiest way I found to stop spending so much time is by adding this well known code in the Head.

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

This code brings back IE8 to IE7 engine which support vertical-align in a better way.

If you got something better than that , I'm open to learn something new :)

Cheers!