MrMurphy1: Text und Icon vertikal zentrieren

Beitrag lesen

problematische Seite

Hallo

Ich sehe zu diesem HTML-Code

<h2><span class="fa fa-user"></span>User</h2>

das folgende CSS

h2 {
   color: rgb(248, 109, 197);
   font-family: 'Indie Flower', cursive;
   font-size: 4.5rem;
   display: flex;
   align-items: center;
}
h2 .fa {
   background-color: rgb(248, 109, 197);
   color: rgb(128, 128, 128);
   font-size: 2.5rem;
   width: 70px;
   height: 70px;
   border-radius: 100%;
   margin-right: 1rem;
   display: flex;
   justify-content: center;
   align-items: center;
}

Die Größenangaben können dann noch nach Wunsch angepasst werden.

Gruss

MrMurphy