Search
 
SCRIPT & CODE EXAMPLE
 

CSS

html align svg to text

/* html-part: Pay attention to the correct name */
<div class="icon baseline">
    <svg width="48" height="48" viewBox="0 0 48 48">
       <path .../>
  	</svg>
</div>

/* css-part */
.svg-icon {
  display: inline-flex;
  align-self: center;
}

.svg-icon svg {
  height:1em;
  width:1em;
}

.svg-icon.svg-baseline svg {
  top: .125em;
  position: relative;
}
Comment

PREVIOUS NEXT
Code Example
Css :: css table cell vertical align 
Css :: blink css 
Css :: tailwind @apply 
Css :: espacio entre lineas css 
Css :: how to make div width auto adjust 
Css :: Define Or Attach Font Face In HTML CSS Web Page 
Css :: scrollbar height css 
Css :: kerning css 
Css :: css scroll snap 
Css :: remove scrollbars scroll 
Css :: css max-width none 
Css :: make a circle in css 
Css :: javascript canvas pixel art 
Css :: css transparent background color 
Css :: css round element 
Css :: add inner border css 
Css :: scroll bar with 0 width 
Css :: css get the image to the center and to make it relative to the width of the parent. 
Css :: download s3 bucket files on l local 
Css :: rgba blue colo 
Css :: cool hover effects css 
Css :: How can I horizontally align my divs? 
Css :: css nth of type 
Css :: use css to replace icon with text when hover 
Css :: background overlay image 
Css :: css selector not empty input 
Css :: line-weight css 
Css :: redirect link after clicking on a button html css 
Css :: Correct border property to add ROUNDED borders to the elements 
Css :: changing bakcgound color like animation using tailwind 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =