Note that there are some explanatory texts on larger screens.

plurals
  1. POOverflow on divs?
    primarykey
    data
    text
    <p>I have created a three-column background type thing, as I previously described in my first question: <a href="https://stackoverflow.com/questions/12903474/how-to-create-a-three-column-website-background-using-css">How to create a three-column website background using CSS?</a>. Anyways, I have it working mostly successfully like so:</p> <p>I have a div with id centercolumn, containing all my page's content (header, content, footer, etc.):</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;div id="centercolumn"&gt; &lt;!-- content --&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Then, in CSS, I have the following settings (only showing the relevant code):</p> <pre><code>body { background-image: url('theimagetobetiledalongthesides.png'); } #centercolumn { position: absolute; top: 0; bottom: 0; right: 0; left: 0; margin-left: auto; margin-right: auto; width: 760px; background-image: url('theimagetobetiledalongthemiddlecontentcolumn.png'); } </code></pre> <p>Essentially, the body provides the background for the whole page, then the centercolumn div goes on top of that and stretches all the way down the page, and has a different background image. This gives the appearance of having three columns: one in the middle for content, and two on the sides.</p> <p>I believe the issue I'm having is with the <code>overflow</code> property of the centercolumn div. On any browser I've tested with (Chrome, Firefox, IE, Opera, and Safari), the center column initially goes all the way to the bottom of the page (as it should). When I vertically resize the page, making it smaller/shorter, once I reach the actual content (which is text), a scrollbar appears on the side of the page/browser (as it normally would). However, when I scroll down to see the rest of the content, it's as though the centercolumn div doesn't go all the way down: the different background image of the centercolumn stops part way down (exactly where the bottom of the browser was before I scrolled back down). My text runs out of the centercolumn background image, and on to the background image of the body.</p> <p>When I set the overflow on the centercolumn div to be <code>scroll</code> and start resizing the page, it works fine (the div seems to go all the way down - the centercolumn background image doesn't cut off), but it creates a rather ugly effect where the scroll bar actually appears on the side of the middle content column rather than the side of the browser.</p> <p>What can I do to get the middle content column's different background image to go all the way down, without causing a scrollbar to appear on the side of the middle column as I vertically resize the browser window?</p> <p><em>edit:</em> JSFiddle example at <a href="http://jsfiddle.net/dDfkC/1/" rel="nofollow noreferrer">http://jsfiddle.net/dDfkC/1/</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.
 

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