Css vertical-align | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Css vertical-align

I was making the menu html for the games I've created before, but the span does not become vertically middle inside the div. How should I fix? https://code.sololearn.com/Wq0Aypqrsy0F/?ref=app

2nd Jan 2019, 6:51 AM
Dri111
Dri111 - avatar
1 Answer
+ 2
1. Quick cure: Add line-height:50px; to div 2. Demo for you: https://code.sololearn.com/Wb42RxO1HrBT/?ref=app 3. Explanation: - Parent no need vertical-align, only the child need vertical align - Parent needs line height property 4. Enrichment v align and h align tutorial by Domino https://www.sololearn.com/post/37760/?ref=app
2nd Jan 2019, 7:04 AM
Gordon
Gordon - avatar