-1

I need to align the image to the left but css bootstrap is automatically aligning it to the center. how to fix it?

    <div class="container">
        <div class="row">
            <div class="col-md-6 img-left"></div>
            <a href="http://placehold.it"><img src="http://placehold.it/150x150" alt="this is the portfolio main photo"></a>
            <div class="col-md-6 text-right text-uppercase">
                <h1>Bruno</h1>
                <h4>The SAVIOR</h4>
            </div>
        </div>
    </div>

the problem

Ole V.V.
  • 81,772
  • 15
  • 137
  • 161

2 Answers2

0

I think you need to close the div that contains your image/anchor after the closing anchor tag. Like so:

<div class="col-md-6 img-left">
<a href="http://placehold.it"><img src="http://placehold.it/150x150" alt="this is the portfolio main photo"></a>
</div>

I can't actually test this but give it a try, I think it should solve your problem.

steven
  • 110
  • 5
0

Looks like you are closing tag with left align before the image.

<div class="col-md-6 img-left">
        <a href="http://placehold.it"><img src="http://placehold.it/150x150" alt="this is the portfolio main photo"></a>
</div>
Assasin_ng
  • 31
  • 1
  • 5