How to vertically center text in CSS Grid and Flexbox
Take this simple HTML: And, some basic styling: It looks like this: Now, we want to center this text vertically. The first modern approach you can take is with flexbox. Just add these two lines to .parent: And, you get this: Simple. It’s very similar with CSS Grid: And, you can add as much text as you want and it’ll get vertically-centered properly. Like this: So, there you go. That said, if you want to go on learning even more HTML and CSS, check out my Website Template course on Skillshare. You’ll learn CSS Grid, CSS transitions, asynchronous requests in