Note that there are some explanatory texts on larger screens.

plurals
  1. POXHTML CSS background not filling entire div
    primarykey
    data
    text
    <p>I've got a page that has a background color for the main container, but for some reason, the color ends just below the header div. The page and the CSS validate in the w3 validators, though, and I have no idea why and I've tried several different fixes.</p> <p>CSS</p> <pre><code>body{ margin:0; padding:0; line-height: 1.5em; background-color: #e5e5dc; color: #000; } #maincontainer{ background-color: green; width: 98%; margin: 0 auto; border: 1px solid black; } #topsection{ background-color: transparent; height: 90px; /*Height of top section*/ } #logo{ background-image: url(); text-align: center; margin: 0 auto; width: 100%; } #contentwrapper{ float: left; width: 100%; background-color: transparent; } #contentcolumn{ margin-right: 230px; /*Set right margin to RightColumnWidth*/ } #rightcolumn{ float: left; width: 230px; /*Width of right column in pixels*/ margin-left: -230px; /*Set left margin to -(RightColumnWidth) */ background-color: transparent; } #footer{ clear: left; width: 100%; background-color: transparent; text-align: center; padding: 4px 0; border-top: 1px solid black; } .innertube{ margin: 10px; /*Margins for inner DIV inside each column (to provide padding)*/ margin-top: 0; } .error{ background-image: url("images/misc/scroll.jpg"); background-position: top left; background-repeat: no-repeat; } a:link, a:visited{ color: #000; text-decoration: none; } a:hover, a:active{ color: #000; text-decoration: underline; } </code></pre> <p>EDIT -- Raw html source straight from view source in my browser</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;Haven &amp;bull; Login&lt;/title&gt; &lt;link href="includes/style.css" rel="stylesheet" type="text/css" /&gt; &lt;script src="includes/jquery.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; function init() { var e = document.createElement('script'); e.src = 'includes/all.js'; document.getElementById('script_insertion').appendChild(e); } &lt;/script&gt; &lt;/head&gt; &lt;body onload="init();"&gt; &lt;div id="script_insertion"&gt;&lt;/div&gt; &lt;div id="maincontainer"&gt; &lt;div id="topsection"&gt; &lt;div class="innertube"&gt; &lt;h1&gt;IMG&lt;/h1&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="contentwrapper"&gt; &lt;div id="contentcolumn"&gt; &lt;div class="innertube"&gt; &lt;form action="./login.php?mode=login" method="post"&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt;Username:&lt;/td&gt; &lt;td&gt;&lt;input type="text" name="username" id="username" size="10" title="Username" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Password:&lt;/td&gt; &lt;td&gt;&lt;input type="password" name="password" id="password" size="10" title="Password" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;input type="reset" value="Clear" /&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="submit" name="login" value="Login" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;input type="hidden" name="remember" value="true" /&gt; &lt;/form&gt; &lt;br /&gt; Don't have an account yet? &lt;a href="./register.php"&gt;Register here!&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="rightcolumn"&gt; &lt;div class="innertube"&gt; Chat &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    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.
 

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