Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As @DavidMillar said, clearing the floats on the footer will solve the overlap problem. However, I suspect that you can achieve the design you want a lot more straightforwardly by using some of the design elements as intended.</p> <pre><code>* { margin: 0px; padding: 0px; } #body { background: #EEEEEE; margin: 0 auto; position: relative; width: 900px; /*background: #BB0099;*/ } #body_title { float: left; width: 200px; /*height: 24px;*/ background: #1199ff; } #body_search { float: right; width: 200px; /*height: 24px;*/ background: #aa11ee; } #body_content { clear: both; width: 900px; /*height: 24px;*/ background: #aa99ff; } #footer { width: 900px; padding: 15px 0px 15px 0px; background: #CC0011; } </code></pre> <p>To summarize:</p> <ol> <li><code>div</code>s are block by default, no need to specify</li> <li>setting margin/padding = 0 on <code>*</code> will apply it all elements: No need to reapply individually.</li> <li>The <code>#body_title</code> and <code>#body_search</code> can be floated left/right to keep them where you want them.</li> <li>Need to clear both floats on the <code>#body_content</code> so it goes back into document flow</li> <li>No need to add <code>position: relative</code> unless you plan on moving the elements around. As now everything is in document flow (except two floats at top) no need to position them.</li> </ol> <p>I also removed the wrappers from the body and footer because I felt they were unnecessary, but you can easily add them back in. :)</p> <p>Check out the <strong>new</strong> fiddle: <a href="http://jsfiddle.net/dR82X/" rel="nofollow">http://jsfiddle.net/dR82X/</a></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. 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