Note that there are some explanatory texts on larger screens.

plurals
  1. POZ-index of absolute positioned div nested in a fixed position div
    primarykey
    data
    text
    <p>I have a fixed position div (header), that has a child div with position absolute that I would like to be on top (in terms of z-index) of everything, but I cant seem to figure out how to do this. The child div with absolute position has a height greater than the header but does not extend over. </p> <p><a href="http://jsfiddle.net/E8Kb2/6/" rel="nofollow">The fiddle is here</a>. </p> <pre><code>&lt;!doctype html&gt; &lt;html lang="en"&gt; &lt;body&gt; &lt;div class="container"&gt; &lt;div class="header"&gt; &lt;div class="center"&gt; &lt;div id="pgSearch" class="search-box"&gt; &lt;div class="input-results"&gt; &lt;p&gt;this should extend over the red part&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="content"&gt; &lt;div class="center"&gt; &lt;p&gt;content&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;!--container--&gt; &lt;/body&gt; &lt;/html&gt; .container { width: 100%; height: 100%; padding-top: 89px; position: relative; z-index:10; background:red; } .header { position: fixed; height: 89px; display: block; padding: 0 20px; top: 0px; left: 0px; right: 0px; overflow-y: hidden; background: green; z-index: 500; } .search-box { width:300px; float:left; position:relative; z-index:501; } .search-box .input-results { position: absolute; top:10px; left: 1px; width:300px; height:300px; z-index:9999; background: white; } </code></pre> <p>What I want is for the white div (input-results) to be on top of everything, but instead it cuts off at the end of the header div which is fixed.</p> <p>I'm losing my mind trying to figure this out.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload