Answer the question
In order to leave comments, you need to log in
Is it better to use padding or height property for buttons?
Is it better to use the padding or height property for optimal button layout?
It will be easier if you ask for example:
height: 60px;
vertical-align:middle;
Answer the question
In order to leave comments, you need to log in
padding works when the height of the button is not fixed, for example the text in the button can wrap over multiple lines and when the button is made via a link rather than an input or button
In fact, it depends on the layout and on who and how will insert and edit the content.
It is more expedient to use paddings, less likely to get text that comes out.
But designers and their requirements are different.
If you have the same font size and the same padding in all buttons, then the height will be the same. It makes no sense to set a fixed height, because then you either need to hide the text of the second line (it can slide when scaling, for example), or it will crawl out of the button.
More universal - indents. And you don't have to worry about text alignment.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question