M
M
mochenkow2021-08-24 17:13:00
css
mochenkow, 2021-08-24 17:13:00

How to align the text with the image in the button in the center?

I'm making a button with an icon - https://code.sololearn.com/WJ9489HEocY4

But I can't make both text and image centered, both vertically and horizontally.
At the moment, I have achieved that the picture is centered, and the text is not vertical.

6124fd831dbeb897108991.png
Tell me, please, how can I fix it? Preferably in my example

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rostislav, 2021-08-24
@rostikowb

.button {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

I ran out of the daily limit for comments)
mochenkov , Give id/class and apply styles to it, I don't know if it's an underline from the link, set it to text-decoration: none

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question