Aligning Text and Icon

Aligning Text and Icon
0.0 0

#1

Hey everyone, so I am trying to create a Web Page, but having some problems when it comes to the text alignment with the icon…

Here’s my HTML code: (I’m using the Material Design Icons)

<span><i class="material-icons">home</i> Some text</span>

The result is this:

alignissue

I can’t find a way to align the text with the icon, any help would be highly appreciated, Thanks in advance!


#2

maybe

<span>
 <i class="material-icons">home</i> 
 <span style="vertical-align: super">Some text</span>
</span>

or

<span>
 <i class="material-icons">home</i> 
 <span style="vertical-align: top">Some text</span>
</span>

?


#3

Thanks!, both work fine, have a great day!