Y
Y
YVW2016-02-11 07:11:38
Design
YVW, 2016-02-11 07:11:38

How to align text correctly?

Please help me figure it out
Set baseline 20px
for 2047P: font-size 14 px line-height 20px
for 4093P: font-size 23px line-height 40px
y -50%: font-size 36px line-height 40px
I want all numbers to be were on the same level and retained their dimensions
. How to properly align in this case? I work in Sketchapp
576b293710064778a44ddd06803b78f3.png

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Y
YVW, 2016-02-12
@YVW

Thanks to everyone for the suggested answers, but the problem was mostly in the functionality of the Sketch itself.
Here are some thoughts and methods for solving this

Z
Zhainar, 2016-02-11
@zhainar

vertical-align: baseline

S
Stalker_RED, 2016-02-11
@Stalker_RED

line-height is not needed: https://jsfiddle.net/o6usq88a/ By default, the text will be aligned to the bottom border of the block anyway.
Perhaps you have alignment on the top, and because of the different line-height, the inscriptions jump.

G
GreatRash, 2016-02-11
@GreatRash

Plus adyn for vertical alignment. Plus a couple of articles for review.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question