문제

I have the following CSS to control three a tags which should have vertically central text, however they appear at the top of the button. It's easier to see result.

CSS Code:

color: #fffae6;
border: 1px solid #fff;
outline: 4px solid #242424;
-moz-transition: background 500ms ease-in-out;
-ms-transition: background 500ms ease-in-out;
-o-transition: background 500ms ease-in-out;
transition: background 500ms ease-in-out;
padding: 5px 0;
-webkit-transition: background 500ms ease-in-out;
background: #242424;
font-size: 1.7em;
display: block;
margin: 0 15px;

In chrome: Chrome's intepretation

In IE: IE's interpretation

Any ideas?

도움이 되었습니까?

해결책

you have to use both the height and line-height property to achieve the same effect in IE.

Check the DEMO.

다른 팁

Please use line-height, as per your height of the button. I hope it will work

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top