Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Consistent icon font spacing throughout browsers/os

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #44403
    croydon86
    Participant

    Hi all

    I am having a lot of trouble vertically aligning an entypo icon font.

    Here is the codepen which currently displays as intended on Safari and Chrome on mac – http://codepen.io/anon/pen/jJtwz

    As you can see the right arrow is vertically centred. Now the problem browsers…

    Mac Firefox – The arrow is slightly lower but can tolerate this

    It appears too low on the following browsers… (Every PC browser)

    Mac Opera
    PC Chrome
    PC Firefox
    PC IE 10
    PC IE 9

    All the PC browsers seem to be resolved by adding a line-height:5px and getting rid of the top value.

    Has anyone experienced the line height inconsistencies between browsers with icon fonts and know of a fix? It seems the OS has something to do with this as opposed to just browser inconsistencies.

    I have tried all sorts of tricks like negative margins, absolute/relative positioning but cannot get consistent results.

    Thanks

    P.S. This was tested on all latest versions of browsers on the latest Mac OS and Windows 8

    #133374
    chrisburton
    Participant

    What about setting a height and using line-height to vertically center?

    #133375
    croydon86
    Participant

    Thanks but it’s the line height thats the problem. For example a line height of 0px would work in the PC Chrome, but mac chrome needs a line-height of 20px to be vertically centered.

    I came across this link https://github.com/danielbruce/entypo/issues/8 – It seems to be an entypo issue, I may try it with fontello to see if there is any difference.

    #133377
    croydon86
    Participant

    Yes! I’ve tried fontello and it works. http://codepen.io/anon/pen/sidje

    #133378
    chrisburton
    Participant

    That’s not vertically centered for me in Chrome (W7)

    #133379
    croydon86
    Participant
    #133380
    chrisburton
    Participant

    That works.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.