Center align font awesome icons vertically in a circle div - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Font awesome

Description

Center align font awesome icons vertically in a circle div

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <link rel="stylesheet" type="text/css" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css"> 
  <style id="compiled-css" type="text/css">
.exp {<!--from   w  w  w.  j a  v a2  s  . co m-->
   width:81px;
   height:81px;
   background-color:Chartreuse;
   display:flex;
   align-items:center;
   justify-content:space-around;
   padding:11px;
   border-radius:51%;
   box-sizing:border-box;
}
</style> 
 </head> 
 <body> 
  <div class="exp"> 
   <i class="fa fa-camera-retro fa-3x"></i> 
  </div>  
 </body>
</html>

Related Tutorials