Streaming live at 10am (PST)

Aligning Button Text vertical !?

hey there,

Im not shure if Im just blind or just stupid :sob:
I want the text to stay center in hight and width.
My Problem:
I would like to adjust some button text into the center not just only horizontal also vertical.
It happens that, when I change the hight of the buttons the text moves up to the top third
of the button hight.
I dont want to use flexbox as solution, so is there any other ?

thx for help !

Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Hmm. A button can be a div with a text inside.

But a button can also be only a text link. Set it to align center, define line-height for the height of the button, ass a color background, define a left and right padding to control the width, or give a width. Your text will always be centers.

With a div and a text inside, don’t give the div a height, but give the text a line-height. line height will define height of the button and text will always be centered in height.

1 Like

Im trying to use the preset buttons from the elements I can add.

If I set the line hight at the same size of the button hight, the text sits at the lower third of the bottom.

for example my button is 65 px hight. fontsize is 24. only the difference of 41 line hight lets it sit right in the horizontale center for some reason.

I mean I can set that fixed like that, but I thought there is a way of setting the horizontal center without beeing dependend to the hight of the button or the hight of the font size (which I am right now) !?

just realized that my topic headline was wrong. I was looking for a resolution for verticaly centering.

so I tried the line height variant, though on the net many ppl say its not the cleanest variant.

1 Like

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.