Note that there are some explanatory texts on larger screens.

plurals
  1. POcentering div behind other divs- padding & margin not working
    primarykey
    data
    text
    <p><code>#home-slider</code> should be perfectly centered behind all other divs within <code>#home</code>. <code>margin</code> and <code>padding</code> don't seem to work, as <code>#home-slider</code> remains at the top, left side of it's parent div. How else can I bring it down and centered? Or rather, what have I missed?</p> <p><a href="http://jsfiddle.net/dsZSE/11/" rel="nofollow">jsfiddle</a></p> <p><a href="http://frshstudio.com" rel="nofollow">live site</a></p> <p>html</p> <pre><code>&lt;!-- language: lang-html --&gt; &lt;div id="home"&gt; &lt;div id="home-slider"&gt; &lt;img src="http://lorempixel.com/g/840/420" alt="home-slider" /&gt; &lt;/div&gt; &lt;div class="logo"&gt; &lt;h1&gt;&lt;a href="#"&gt;&lt;img src="http://lorempixel.com/232/232" alt="logo" id="logo" /&gt;&lt;/a&gt;&lt;/h1&gt; &lt;/div&gt;&lt;!-- end logo --&gt; &lt;div id="slider_mask"&gt; &lt;div class="slide_container"&gt; &lt;div class="slide"&gt;&lt;p&gt;is where creative &lt;i&gt;je ne sais quoi&lt;/i&gt; + business savvy collide.&lt;/p&gt;&lt;/div&gt; &lt;div class="slide"&gt;&lt;p&gt;is the maker + doer for makers + doers&lt;/p&gt;&lt;/div&gt; &lt;div class="slide"&gt; &lt;ul&gt; &lt;li&gt;No items.&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="left_button"&gt;&lt;a href="#" class="left-arrow" title="left arrow"&gt;&lt;/a&gt;&lt;/div&gt; &lt;div class="right_button"&gt;&lt;a href="#" class="right-arrow" title="right arrow"&gt;&lt;/a&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;!-- end home --&gt; </code></pre> <p>css</p> <pre><code>#home-slider { top:0; height:100%; left:0; position:fixed; z-index:-9999; } #home .logo { padding-top: 215px; margin: 0 auto; width: 232px; } #home #slider_mask { width: 600px; margin: 0 auto; padding-top: 60px; position: relative; overflow: hidden; } #home #slider_mask .left_button { float: left; display: block; width: 23px; height: 25px; background: url(img/left-arrow.png); text-indent: -99999px; } #home #slider_mask .left_button:hover { background: url(img/left-arrow-hover.png); background-position: 0 0; } #home #slider_mask .slide_container { float: left; font-size: 120%; text-align: center; width: 300px; } #home #slider_mask .right_button { float: right; display: block; width: 23px; height: 25px; background: url(img/right-arrow.png); text-indent: -99999px; } #home #slider_mask .right_button:hover { background: url(img/right-arrow-hover.png); background-position: 0 0; } #home #slider_mask .slide { float: left; display: block; text-align: center; } </code></pre>
    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