Note that there are some explanatory texts on larger screens.

plurals
  1. PODiv set to back z-index if not position:absolute/fixed
    primarykey
    data
    text
    <p>I have an issue, in my other site, this all works for me, but for my new one, it's not. But here's my issue, I am trying to have different sections on my website, so I'm not setting the position to the sections with any value ex. Top, left. I'm not giving them a <code>postion:absolute</code> in CSS or anything, because I want them to "stack".</p> <p>But right now, they are going behind everything on my website, as if there z-index is below the other ones, but it's definitely not with how much I've played with it.</p> <p>Here is my code and, <a href="http://jsfiddle.net/qSC7N/4/" rel="nofollow">click here for an UPDATED example on JSFiddle.</a></p> <p>HTML </p> <pre><code>&lt;div id="bg_reg"&gt;&lt;/div&gt; &lt;div id="bg_blur"&gt;&lt;/div&gt; &lt;div id="section2"&gt;You can't see this div.&lt;/div&gt; </code></pre> <p>Javascript</p> <pre><code>$(function() { // hide #back-top first $("#bg_blur").hide(); // fade in #back-top $(function () { $(window).scroll(function () { if ($(this).scrollTop() &gt; 70) { $('#bg_blur').fadeIn(600); } else { $('#bg_blur').fadeOut(600); } }); }); }); </code></pre> <p>CSS</p> <pre><code>#section2{ width:100%; background:url(../images/white.jpg) #FFF; -webkit-box-shadow: 0px 0px 30px rgba(50, 50, 50, 1); -moz-box-shadow: 0px 0px 30px rgba(50, 50, 50, 1); box-shadow: 0px 0px 30px rgba(50, 50, 50, 1); z-index:150; } #bg_reg { background: url(../images/bg_reg.jpg) no-repeat right top; background-size: cover; position: fixed; bottom: 0%; left: 0%; width: 100%; height: 100%; -webkit-transition: opacity 500ms; -moz-transition: opacity 500ms; -o-transition: opacity 500ms; -ms-transition: opacity 500ms; transition: opacity 500ms; z-index:0; } #bg_blur { background: url(../images/bg_blur.jpg) no-repeat right top; background-size: cover; position: fixed; bottom: 0%; left: 0%; width: 100%; height: 100%; z-index:0; } </code></pre> <p>Probably a really stupid question and someone will know the answer easy, but I'm stumped. Thanks for all help in advance!</p> <p>**I now know z-index wont work on non-positioned elements, but how can I get this sites content working? I have it working like I want on <a href="http://darrylhuffman.com" rel="nofollow">This site</a> and I can't find out what I have done differently. </p>
    singulars
    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