Skip to content

Instantly share code, notes, and snippets.

@matrixwd
Created December 22, 2019 02:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matrixwd/db14e2ff89d91104277ba5ccaa6c30c1 to your computer and use it in GitHub Desktop.
Save matrixwd/db14e2ff89d91104277ba5ccaa6c30c1 to your computer and use it in GitHub Desktop.
Font Awesome CSS Circle Background
/*
As you know there is 2 ways to do this. One is stacked icons as described here: https://fontawesome.com/how-to-use/on-the-web/styling/stacking-icons
However this is a much simpler approach
Adjust the width, height, line-height, and padding to suite your needs
I used the i selector for general purposes but you can change it as well
*/
i {
background: #ffc0c0;
width: 100px;
height: 100px;
border-radius: 50%;
text-align: center;
line-height: 100px;
vertical-align: middle;
padding: 30px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment