Note that there are some explanatory texts on larger screens.

plurals
  1. POoverlap divs with relative positioning?
    primarykey
    data
    text
    <p>Is it possible to overlap divs with CSS without using absolute coordinates -- that is, with relative positioning?</p> <p>I have a background image I split into 3 vertical pieces,</p> <ul> <li>1st one is left-aligned, </li> <li>2nd one repeats across the middle, </li> <li>3rd one is right-aligned </li> </ul> <p>Then I want to have my main site content on top of that, centered. I'm not sure how to do this without using absolute positioning.</p> <pre><code> Kinda like this |$$$$$|**********************|&amp;&amp;&amp;&amp;&amp;| |$$$$$|**********************|&amp;&amp;&amp;&amp;&amp;| |$$$$$|----------------------|&amp;&amp;&amp;&amp;&amp;| |$$$$$| |&amp;&amp;&amp;&amp;&amp;| |$$$$$| |&amp;&amp;&amp;&amp;&amp;| |$$$$$|shakeyour&lt;body&gt;&lt;/body&gt;|&amp;&amp;&amp;&amp;&amp;| |$$$$$| |&amp;&amp;&amp;&amp;&amp;| |$$$$$| |&amp;&amp;&amp;&amp;&amp;| |$$$$$|----------------------|&amp;&amp;&amp;&amp;&amp;| |$$$$$|**********************|&amp;&amp;&amp;&amp;&amp;| |$$$$$|**********************|&amp;&amp;&amp;&amp;&amp;| Different symbols = differnt background image or pattern </code></pre> <p>I was thinking about having the backgrounds just as three divs, and then have the body div positioned absolutely, but I want it to be centered for widescreen displays. Any ideas?</p> <pre><code>For example, the expected behavior under resizing: |$$$$$|**********************|&amp;&amp;&amp;&amp;&amp;| |$$$$$|**********************|&amp;&amp;&amp;&amp;&amp;| |$$$|--------------------------|&amp;&amp;&amp;| |$$$| |&amp;&amp;&amp;| |$$$| |&amp;&amp;&amp;| |$$$| shakeyour&lt;body&gt;&lt;/body&gt; |&amp;&amp;&amp;| |$$$| |&amp;&amp;&amp;| |$$$| |&amp;&amp;&amp;| |$$$|--------------------------|&amp;&amp;&amp;| |$$$$$|**********************|&amp;&amp;&amp;&amp;&amp;| |$$$$$|**********************|&amp;&amp;&amp;&amp;&amp;| --- |$$$$$|**********************|&amp;&amp;&amp;&amp;&amp;| |$$$$$|**********************|&amp;&amp;&amp;&amp;&amp;| |$|------------------------------|&amp;| |$| |&amp;| |$| |&amp;| |$| shakeyour&lt;body&gt;&lt;/body&gt; |&amp;| |$| |&amp;| |$| |&amp;| |$|------------------------------|&amp;| |$$$$$|**********************|&amp;&amp;&amp;&amp;&amp;| |$$$$$|**********************|&amp;&amp;&amp;&amp;&amp;| </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