css - middle align svg with inline text -


i have simple svg image inline text pasted here. how middle-align both text , icon vertically? tried usual ways middle align such setting negative martin-top, use table-cell no luck.

html:

<div class="imagelabel__label___yb88q">     <i class="imagelabel__icon___bfegt">         <svg id="layer_1" data-name="layer 1" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 32 32">             <title>email</title>             <path d="..."></path>         </svg>     </i>     john@gmail.com </div> 

css:

svg {   width: 25px;   height: 25px;   margin-right: 3px; } 

   svg {     width: 25px;     height: 25px;     margin-right: 3px;     vertical-align: middle;   /*----- add property in svg -----*/     } 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -