title: Absolute element inheriting relative parent div's width
body: <p>I am trying to position a gradient over an inline / inline-block anchor link, and have that gradient inherit the width of that parent anchor. The problem is that the span either inherits the entire width of the anchor's parent, or just the width of the &amp;nbsp;. I am unable to get the span element to properly inherit the width while maintaining the anchors inline display.</p>
  
  <p>CSS</p>
  
  <pre><code>a { width: auto; display: inline-block; }
  
  a span { background: url(../images/fade_h1.png); width: 100%; height: 12px; position: absolute; display: block; z-index: 3; }
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;a href="index.php"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;Index&lt;/a&gt;
  </code></pre>