How to vertically align text
I'm trying to vertically align
label
text within a form. Alignment was fine until I added a fixed height to the label of 50px
. Here is my codepen - https://codepen.io/Matt-CopOffMatt/pen/OJdLGeB
I've tried: vertical-align: middle;
, doesn't seem to fix my issue.2 Replies
Replace
height:50px
with padding: 1rem
. Rather than trying to align the text in the div, make the div fit the text
Generally you want to have implicit sizing, that accommodates everything inside rather than figure out the specific size it should be@z- ::theProblemSolver:: Cool, thank you 👍
appreciate it\