1st Aug 2020, 6:44 PM
Abhay
Abhay - avatar
23 ответов
+ 5
I think is problem is due to different line concept for character and symbol. Line height set the baseline of typography.and all character sit on base line. In case of alphbates they must lie between baseline and shoulder line hence appear to be in center but as symbol need not to touch shoulder line and sit at base they appears little bit lower than alphabet In your case as font size is more it looking more lower. Go to this link to see the anatomy of typography https://www.reddit.com/r/coolguides/comments/ar1m49/know_your_type/
2nd Aug 2020, 2:24 PM
Divya Mohan
Divya Mohan - avatar
+ 6
→hello; This is why the arrow was not centered vertically. It's by the design of arrow unicode, that it is displayed a bit lower 😐
2nd Aug 2020, 3:42 AM
777
777 - avatar
+ 5
It's the arrow itself the problem, but you would have to change the character to change that. Or move the alignment out from center to top.
1st Aug 2020, 7:49 PM
Sandra Meyer
Sandra Meyer - avatar
+ 5
I like those arrows too, but they are always annoying me, because even within normal office documents it's the same s*** with them.
1st Aug 2020, 7:54 PM
Sandra Meyer
Sandra Meyer - avatar
+ 5
Sandra Meyer damn that's annoying! ,thanks for the help tho :-)
1st Aug 2020, 7:57 PM
Abhay
Abhay - avatar
+ 5
remove line-height from div Set line-height 7vh for #one 12vh for #two.
1st Aug 2020, 8:20 PM
Divya Mohan
Divya Mohan - avatar
+ 4
Anisha that increases width and height of element ,not what I want , basically the text is centered and arrow isn't ,why is that?
1st Aug 2020, 7:33 PM
Abhay
Abhay - avatar
+ 4
Sandra Meyer it should be centered vertically as well just like text,and yes I ran it on Chrome on Android
1st Aug 2020, 7:41 PM
Abhay
Abhay - avatar
+ 4
Just put another 'h' next to the arrow, there's nothing wrong with your alignment...
1st Aug 2020, 7:45 PM
Sandra Meyer
Sandra Meyer - avatar
+ 3
Are you sure about that? For me it looks very centered... (Android + Chrome)
1st Aug 2020, 7:40 PM
Sandra Meyer
Sandra Meyer - avatar
1st Aug 2020, 7:43 PM
Sandra Meyer
Sandra Meyer - avatar
+ 3
But the arrow is a little bit lower than a normal text, isn't it?
1st Aug 2020, 7:44 PM
Sandra Meyer
Sandra Meyer - avatar
+ 3
Yes
1st Aug 2020, 7:45 PM
Abhay
Abhay - avatar
+ 3
Sandra Meyer yes it works perfect for text but not for arrow for some known reason that I am not aware of
1st Aug 2020, 7:47 PM
Abhay
Abhay - avatar
+ 3
Doesn't work Kode Krasher ,it's better to give it a different line-height and hide overflow text in case it covers another element
2nd Aug 2020, 2:00 PM
Abhay
Abhay - avatar
+ 3
Kode Krasher um ,sorry ,thks a lot tho:-)
2nd Aug 2020, 9:14 PM
Abhay
Abhay - avatar
+ 3
Divya Mohan thank you very much for that article and a clear explanation
2nd Aug 2020, 9:15 PM
Abhay
Abhay - avatar
+ 2
Rahul Verma yup but I don't want that behaviour😅
2nd Aug 2020, 12:59 PM
Abhay
Abhay - avatar
+ 2
Abhay if you want to align any element to the center no matter what type they there are, you should use box-sizing: border-box; and padding specifically padding-top: total height of the box minus size of the element inside the box divide by two px, vh or %; , This is your previous code i centered it👇👇https://code.sololearn.com/WgtFjFHP49qj/?ref=app
2nd Aug 2020, 9:23 PM
ugochukwu Joseph
ugochukwu Joseph - avatar
+ 1
i even had trouble with that thanks
2nd Aug 2020, 5:22 PM
Leon Aseka
Leon Aseka - avatar