html - Icon Style has different results than Icon Class -


i trying use font-awesome icons in site.

i have following html:

<a href="some-link"><center><h2><i class = "fa fa-hdd-o" style = "color:black;vertical-align:middle;font-size:40px"></i> mining rig building service</h2></center></a> 

this how want look, how looks element-styling:

original image element-styling

this has different results if use:

<a href="some-link"><center><h2><i class = "fa fa-hdd-o icon-40" style = "color:black;"></i> mining rig building service</h2></center></a> 

with in stylesheet:

.icon-40 {     font-size: 40px;     vertical-align: middle;     } 

the icon isn't aligned correctly here:

new version class-styling

i same result (with misaligned icon) if set class icon-40 fa fa-hdd-o instead of fa fa-hdd-o icon-40.

how can align icon? want use class instead of direct element-styling because have lot of similar icons, , don't want use element-styling of them.

i don't see problems, looks example, inline - http://jsfiddle.net/g29tw/

<a href="some-link"><center><h2><i class = "fa fa-hdd-o" style = "color:black;vertical-align:middle;font-size:40px"></i> mining rig building service</h2></center></a> 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -