Note that there are some explanatory texts on larger screens.

plurals
  1. PODIV Element Expands Beyond the Visible Portion of Browser
    primarykey
    data
    text
    <p>This problem forks from an earlier issue I was having with getting <strong>DIV elements to expand automatically</strong>, and which was corrected with "overflow: all;". </p> <p>So with that out of the way, this new issue is almost the complete opposite I guess, this time the DIVS expand beyond the bottom of the page so that a portion of the div is no longer visible. From playing around with the code, this seems only to happen when I position the DIVS relatively.</p> <p>Please see JSFiddle for a clear example. I have been trying to solve this for hours! Thank you. </p> <p><a href="http://jsfiddle.net/wguayan/H6du7/1/" rel="nofollow">JSFIDDLE</a></p> <p>HTML:</p> <pre><code>&lt;body&gt; &lt;div id="container"&gt; &lt;div id="block1"&gt; &lt;div id="one"&gt;one&lt;/div&gt; &lt;/div&gt; &lt;div id="block2"&gt; &lt;div id="two"&gt;two&lt;/div&gt; &lt;div id="three"&gt;three&lt;/div&gt; &lt;div id="four"&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt;four &lt;br /&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; </code></pre> <p>CSS:</p> <pre><code>#container { width: 1050px; margin: auto; padding: 5px; background-color: #ededf0; background: url("http://wguayan.comuv.com/brushed_metal_clear_apple.jpg") repeat; } #one, #two, #three, #four { border-width: 1px; border-color: black; border-style: solid; background-color: white; border-radius:6px; -moz-border-radius:6px; /* Firefox 3.6 and earlier */ } #one { float: right; width: 100px; position: relative; top: 0px; left: 0px; padding: 10px; box-shadow: 9px 9px 12px #888888; } #two { float: left; width: 100px; position: relative; top: 0px; left: 0px; padding: 5px; text-align: center; box-shadow: 9px 9px 12px #888888; } #three { float: right; width: 100px; position: relative; top: 150px; right: 30px; padding: 10px; box-shadow: 9px 9px 12px #888888; } #four { float: right; width: 100px; position: relative; top: 300px; right: 40px; padding: 10px; box-shadow: 9px 9px 12px #888888; } #block1 { width: 100%; overflow: hidden; border-width: 1px; border-color: black; border-style: solid; } #block2 { width: 100%; overflow: hidden; border-width: 1px; border-color: black; border-style: solid; } </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    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