Keanu Hie Keanu Hie - 3 years ago 183
HTML Question

How do i center an image in a row

How do i center an image in a row.
My code is not working.

<div class="container">
<div class="row">
<div class="col s10">
<img class="center" src="house.png" alt="House"/>
</div>
</div>
</div>


There are no problems with a text tag (e.g.
h1
or
p
)

Edit: The class
center-align
doesn't work either.

Answer Source

you can use text-center like this:

<div class="container">
   <div class="row">
      <div class="col s10 text-center">
          <img class="center" src="house.png" alt="House"/>
      </div>
   </div>
</div>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download