I've made a span composed of an image and text, using the following HTML code. And I'm trying to align that text next to the image, using the following css class:
background-position: left center;
padding-left: 16px; /* Or size of icon + spacing */
<span class="my-profile">My Full Name</span>
Adding the background image to the same span with the text will only place the image as the background of the span with text.. try placing the image as a separate element in the span using
<img /> tag. You can then control the image and the text using either display:inline-block or float in css.