title: Why isn't z-index working here
body: <p>I'm trying to make images overlap , I should see all of 'Adobe' of the first image ,  but e was blocked by the second one , so does the third.</p>
  
  <p><img src="https://i.stack.imgur.com/ZHyWx.png" alt="enter image description here"></p>
  
  <p>I use diferent z-index to make the left-most image shows at top of stack , but it doesn't work here. Is it wrong to use margin-left with negative value ?</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Demo&lt;/title&gt;
          &lt;style&gt;
              li {
                  float: left;
                  display: inline;
                  margin-left: -20px;
              }
              .A {
                  z-index: 10;
              }
              .B {
                  z-index: 9;
                  margin-top: 3px;
              }
              .C {
                  margin-top: 6px;
                  z-index: 8;
              }
          &lt;/style&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;ul&gt;
              &lt;li&gt;&lt;img class="A" src='adobe.gif' /&gt;&lt;/li&gt;
              &lt;li&gt;&lt;img class="B" src='adobe.gif' /&gt;&lt;/li&gt;
              &lt;li&gt;&lt;img class="C" src='adobe.gif' /&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>