make a button two lines text and icon vertically centered - HTML CSS CSS Form

HTML CSS examples for CSS Form:input button text

Description

make a button two lines text and icon vertically centered

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="http://fortawesome.github.io/Font-Awesome/assets/font-awesome/css/font-awesome.css"> 
  <style id="compiled-css" type="text/css">

.btn {<!--from   w ww  .j av a  2 s.  com-->
   background: #ffffff none repeat scroll 0 0;
   border: 1px solid #cecece;
   border-radius: 4px;
   box-shadow: none;
   color: #19d197;
   display: block;
   margin-bottom: 5px;
   padding: 0 10px 0 30px;
   position: relative;
}
.bz-fa-icon {
   left: 5px;
   margin-right: 5px;
   position: absolute;
   top: 50%;
   transform: translateY(-50%);
   vertical-align: middle;
}


      </style> 
 </head> 
 <body> 
  <button class="btn"> <i class="fa fa-check bz-fa-icon"> </i> Confirm <br> Return </button>  
 </body>
</html>

Related Tutorials