Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why font-icons have extra height?

I'm using a set of icon Fonts that I created using Ico moon. The icons look and work great in Firefox and Chrome, but the icons appear in IE 10 with extra height.

I'm not sure where the height is coming from.

Here in IE 10, the icons are appearing to have a much greater height. IE icons with extra height

Here is what they look like in chrome with the correct height. enter image description here

Here is the CSS for the icons:

font-family: 'IconFont';
speak: none;
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing: antialiased;

And here is the Traced Styles from IE10 Dev tools.enter image description here

I made a quick demo on codepen.io of a simliar problem.Demo is here

Is anyone experiencing similar issues? Has anyone found a fix for this?

like image 635
Ryan Gill Avatar asked Apr 19 '13 14:04

Ryan Gill


1 Answers

Problem with line-height : 1

you write

line-height: 20px ;
like image 99
masoud soroush Avatar answered Oct 06 '22 01:10

masoud soroush