Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Right-align Image using bootstrap3

<div class="row">
    <div class="col-xs-3">
        <img src="image/t.png " class="img-responsive">
    </div>
    <div class="col-xs-9 ">
        <img src="image/b.png " class="img-responsive">
    </div>
</div>

I want b.png image to be right-align.

like image 234
Krishna Rana Avatar asked Jan 13 '16 15:01

Krishna Rana


People also ask

How do I align an image to the right in Bootstrap?

Place the image at the required line inside the <body> tag. Wrap the image element in . float-left class for aligning towards left, . float-right to align towards right.

How do I center an image in Bootstrap 3?

Answer: Use the center-block Classcenter-block on it, along with the . img-responsive class in Bootstrap 3.

How do I center align an image in Bootstrap?

Aligning images block -level images can be centered using the .mx-auto margin utility class.

How do I put text and images side by side in Bootstrap?

To create image and text side by side use the grid system property of bootstrap and create 2 columns of span 6-6. Put your image in one column and your text in another. On smaller devices, it will automatically align vertically.


2 Answers

You just need to add .pull-right class. So it will be like this example :

<div class="row">
    <div class="col-xs-3">
        <img src="image/t.png " class="img-responsive">
    </div>
    <div class="col-xs-9 ">
        <img src="image/b.png " class="pull-right img-responsive">
    </div>
</div>
like image 147
Alexandru R Avatar answered Oct 25 '22 11:10

Alexandru R


Just add the pull-right bootstrap class

<div class="col-xs-9 ">
    <img src="image/b.png " class="img-responsive pull-right">
</div>
like image 37
Norvert John Abella Avatar answered Oct 25 '22 10:10

Norvert John Abella