PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, November 17, 2022

[FIXED] What is the vertical equivalent of CSS font-kerning?

 November 17, 2022     css, font-size, fonts, text, vertical-alignment     No comments   

Issue

I have a font that is misaligned since the baseline is below y, g, j, etc. as opposed to regular baseline.

I've tried messing around with a few properties (line-height, height, display: inline-block, vertical-align: text-top) but can't get the font as far centered as it should be.

Is there a CSS equivalent of kerning, but in a vertical direction? Is there another way to uniformly fix this font via CSS?


Solution

This is a very old question, but the solution I ended up using (as with most CSS) was to create a wrapper and pad asymmetrically, therefore raising the apparent baseline.

The main use-case was with headers with large border-radius causing slight (visual) vertical mis-alignment.



Answered By - neaumusic
Answer Checked By - Mildred Charles (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing