Center text vertically without using padding
-
Depending on length of text, sometimes my button has one line of text, sometimes two lines.
Using the padding feature to vertically centre the text does not work in this case because without using padding the “one line of text” will be at the top of the button, whereas the “two lines of text” will be centred. If I use padding, then I can centre the “one line of text”, but then the “two lines of text gets pushed down”.
So I am forced to use two different buttons simply because some have more text than others.
See this page: https://greatnessu.com/acm-specialist-register/ Where I had to copy a button so there would be one with padding=3 and one with padding=13. This is a clunky solution.
Is it possible to centre-align text VERTICALLY in the button without using padding?
- The topic ‘Center text vertically without using padding’ is closed to new replies.