title: CSS Gradient On Top An Image Tag (HTML)
body: <p>I'm trying to pull off this effect:</p>
  
  <p><a href="http://imgur.com/aEKKuM7" rel="nofollow">http://imgur.com/aEKKuM7</a></p>
  
  <p>The gray is a placeholder for the images.</p>
  
  <p>My goal was to use a CSS Gradient (White to Transparent) and have the image display below the gradient. The placeholder image will eventually be the posts featured images for a wordpress theme. Which is why I didn't use a background image.</p>
  
  <p>My coded version looks like this: <a href="http://imgur.com/QWmdJSa" rel="nofollow">http://imgur.com/QWmdJSa</a></p>
  
  <p>I'm not sure how to get it to drop below the gradient. I tried using a Z-index but that hides the image behind everything.</p>
  
  <p>Here's how my code looks:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;article class="inlineContainer newsBox"&gt;&lt;!-- Gradient is on newsBox class --&gt;
      &lt;div class="details"&gt;
          &lt;div class="image"&gt;
              &lt;strong class="tag"&gt;Games&lt;/strong&gt;
              &lt;img src="images/newsimg.jpg" alt="preview" /&gt; &lt;!-- Image I want Behind Gradient--&gt;
          &lt;/div&gt;
          &lt;/div&gt;              
          &lt;div class="post borderBox"&gt;
              &lt;h3&gt;&lt;a href=""&gt;We will tell you everything about Aatrox New Champion&lt;/a&gt;&lt;/h3&gt;
              &lt;p&gt;Aliquam erat volutpat. Morbi a augue et velit congue faucibus. Quisque suscipit porta iaculis. Vivamus et elementum orci. Proin euismod ante nisi, vel consectetur massa dapibus id. Donec condimentum... Ut quis nisl at erat ultricies pellentesque at ut justo. &lt;/p&gt;
              &lt;div class="bottom"&gt;
                  &lt;div class="metaDetails"&gt;
                      &lt;a class="author borderBox" href=""&gt;Doublelift&lt;/a&gt;
                      &lt;a class="comments borderBox" href=""&gt;1289 Comments&lt;/a&gt;
                  &lt;/div&gt;
                  &lt;a class="readMore" href=""&gt;Read More&lt;/a&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  &lt;/article&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>.newsBox {
      border: 1px solid #bdccd3;
      border-radius: 5px;
      box-shadow: 0px 2px 3px 0px rgba(207, 218, 220, 1);
      background: -moz-linear-gradient(left,  rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
      background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(255,255,255,0)), color-stop(100%,rgba(255,255,255,1)));
      background: -webkit-linear-gradient(left,  rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%);
      background: -o-linear-gradient(left,  rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%);
      background: -ms-linear-gradient(left,  rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%);
      background: linear-gradient(to right,  rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%);
      filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ffffff',GradientType=1 );
  }
  .image {
      height: 100%;
      width: 160px;
      margin: 0 auto;
      position: relative;
      background-color: grey;
  }
  .image img {
      height: 261px;
      width: 160px;
      display: block;
  }
  </code></pre>