lundi 4 juillet 2016

HTML: How do i center align an image inside an tag

I want to center an image inside a tag how do i do it? the image is placed on the extreme left on the screen but i want it to be in the center of the screen without sticking to the left. here is my html:

<div class="sequence-slider">
  <div id="sequence"><i class="sequence-prev icon-angle-left"></i> <i class="sequence-next icon-angle-right"></i>
    <ul class="sequence-canvas">

      <!-- Sequencejs Slider Single Item -->
      <li>

        <img class="main-image" src="photo/fac2.jpg" alt="Image" /> 

      </li>

      <!-- Sequencejs Slider Single Item -->
      <li>

        <img class="main-image" src="photo/fac1.jpg" alt="Image" /> 

      </li>

      <!THIS IMAGE STICK TO THE LEFT BUT I WANT IT IN THE CENTER>
      <li>
        <img class="main-image" src="photo/slide3.png" alt="Image" style ="width: auto;
  height : auto; " /> 

      </li>

    </ul>

enter image description here




Aucun commentaire:

Enregistrer un commentaire