简体   繁体   中英

Text not aligning middle

在此输入图像描述

As you can see the text is aligned towards the top instead of in the middle.

It occurs on chrome as well as firefox, various versions including latest.

Various Line-height / Font-size / Vertical-align doesnt fix anything, it always stays slightly upwards. I can't find a solution to what this causes? There is really no fancy css added to it, this is just a blank h1 with padding to it.

I think you either have a padding or margin issue. Check to see if you are calling and what happens when you taken them off.

I found the solution. It is my Helvetica. (standard macbook pro font)

If I use arial it aligns nicely in the middle, if i use helvetica it is slightly (1px-ish) tilted upwards/downwards.

see what i mean here: jsfiddle.net/fgUf5

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM