title: Centering my images in CSS
body: <p>I've created an image slider using pure CSS using keyframe and animate, however I'm trying to centre my images using by margin: auto for left and right but it doesn't seem to centre it, can I move it around giving it actual pixel values.
  Heres my CSS code:</p>
  
  <pre><code>.slide {
      position:absolute;
      margin-left: auto;
      margin-right: auto;
      width: em;
      padding: 3px;
      border-top: 2px dotted black;
      border-bottom: 2px dotted black;
  }
  </code></pre>
  
  <p>Heres HTML code:</p>
  
  <pre><code>        &lt;div id="slider"&gt;
              &lt;img src="images/horse4.jpg" class="slide"&gt;
              &lt;img src="images/horse3.jpg" class="slide"&gt;
              &lt;img src="images/horse2.jpg" class="slide"&gt;               
              &lt;img src="images/horse1.jpg" class="slide"&gt;
      &lt;/div&gt;
  </code></pre>