html - Align text in the middle, inline with icon -
can't seem piece of text align check icon, please , thanks
<div class="col-md-12" style="background: #d9232a; padding: 20px;"> <div><i class="fa fa-check-square fa-2x"></i><p style="display: inline;"> sculptured</p></br></div> <div><i class="fa fa-check-square fa-2x"></i><p style="display: inline;"> 40mm triple glazing</p></br></div> <div><i class="fa fa-check-square fa-2x"></i><p style="display: inline;"> pas 23 & 24 approved</p></br></div> <div><i class="fa fa-check-square fa-2x"></i><p style="display: inline;"> highly security options</p></br></div> </div>
the default alignment of inline elements baseline
need reset vertical-align
property more appropriate.
.fa { vertical-align: middle; }
should it.
.fa { vertical-align: middle; }
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" /> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" /> <div class="col-md-12" style="background: #d9232a; padding: 20px;"> <div><i class="fa fa-check-square fa-2x"></i> <p style="display: inline;">fully sculptured</p> </br> </div> <div><i class="fa fa-check-square fa-2x"></i> <p style="display: inline;">40mm triple glazing</p> </br> </div> <div><i class="fa fa-check-square fa-2x"></i> <p style="display: inline;">pas 23 & 24 approved</p> </br> </div> <div><i class="fa fa-check-square fa-2x"></i> <p style="display: inline;">highly security options</p> </br> </div> </div>
Comments
Post a Comment