Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap - Pull Icon to Left of Text

In Bootstrap 3, I want to have an icon centered to the left of an H6 and some text.

Here's my code:

<div class="row">
    <div class="col-sm-8">
         <div class="pull-left"><i class="fa fa-life-ring fa-3x"></i></div>
         <div class="pull-right">
         <h6>Unlimited Support</h6>
         We're here to help! Just ask away...
         </div>
    </div>
</div>

It looks like this right now (icon is above the text, rather than on the left):

screenshot1

How do I get it to format correctly?

This code:

<div class="row">
    <div class="col-sm-8">
         <div class="pull-right">
             <h6><i class="fa fa-life-ring fa-3x"></i> Unlimited Support</h6>
             We're here to help! Just ask away...
         </div>
    </div>
</div>

Displays like this:

screenshot2

But, I want to put the icon beside both lines of text (have the "We're here..." move to the right/not wrap underneath.

like image 866
okoboko Avatar asked Oct 21 '25 16:10

okoboko


1 Answers

you can try this

jsFiddle Demo

<div class="media">
  <a class="pull-left" href="#">
    <img class="media-object" src="..." alt="...">
  </a>
  <div class="media-body">
    <h4 class="media-heading">Media heading</h4>
    ...
  </div>
</div>
like image 106
Sunny Avatar answered Oct 24 '25 06:10

Sunny



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!