Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Add <code>height:100%</code> to <code>html,body</code> and remove <code>&lt;center&gt;</code> tag instead use <code>margin:0 auto</code> to <code>#container</code></p> <pre><code> html,body{height:100%} #container { background-color:red; height:100%; width:900px; margin:0 auto } #main_body { width:800px; background-color:#FFFFFF; height:100%; margin:0 auto } </code></pre> <p><strong><a href="http://jsfiddle.net/LmxvV/1/" rel="nofollow">DEMO</a></strong></p> <hr> <p>For that issue change the html like this,</p> <ul> <li>Add an outer div to entire markup, make it <code>position:relative</code> and give <code>position:absolute</code> to container div</li> <li>use <code>z-index</code> to push the container div below the logo div.</li> <li>Finally add an empty div inside the <code>#main_body</code> to give the height(same as logo div height)</li> </ul> <p><strong>HTML</strong></p> <pre><code>&lt;div id="wrapper"&gt; &lt;div id="logo"&gt; logo html &lt;/div&gt; &lt;div id="container"&gt; &lt;div id="main_body"&gt; &lt;div class="space"&gt;&lt;/div&gt; asd &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p><strong>CSS</strong></p> <pre><code>#wrapper{ height:100%; background:grey; position:relative; } #container { background-color:red; height:100%; width:900px; margin:0 auto; position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index:1; } #main_body { width:800px; background-color:#FFFFFF; height:100%; margin:0 auto; } .space{height:165px} </code></pre> <p><strong><a href="http://jsfiddle.net/LmxvV/3/" rel="nofollow">DEMO 2</a></strong></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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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