Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS Page Centering
    primarykey
    data
    text
    <p>I'm not sure where my code is messed up, but I'm trying to get my code to center. Here is what I have so far:</p> <p>The problem that I am running into is that the page won't actually center. When it loads, the left margin is only a 10px. I'm sure there is a conflict somewhere, or I just borked something, and I've been searching for hours now, and have found nothing. Here is the following code:</p> <pre><code>body { background-color: #12121D; } #contain { display: block; width: 1000px; margin: 0 auto; } .version{ text-align:right; font-family: Calibri, sans-serif, serif; text-decoration:none; color:#00F; } #header { width: 1000px; height: 230px; } #logo { width: 600px; margin: 50px 0px 0px 10px; padding: 0px; float: left; position: absolute; } #banner { text-align: right; float: right; z-index: -1; } #menu { height: 80px; margin: 0 auto; } #main { height: 500px; width: 850px; margin-left: 75px; /*position: absolute;*/ z-index: 4; /*float: left*/; } #content { width: 850px; height: 500px; float: left; margin-left: 0px; } </code></pre> <p>And the html follows as:</p> <pre><code>&lt;body&gt; &lt;div id="contain"&gt; &lt;div id="header"&gt; &lt;div id="logo"&gt; &lt;img src="images/logo.png" alt="logo" /&gt; &lt;br /&gt; &lt;a class="version" href="JavaScript:changeSheets(1)"&gt;View Mobile&lt;a/&gt; &lt;/div&gt; &lt;div id="banner"&gt;&lt;img src="images/banner.png" alt="banner"/&gt;&lt;/div&gt; &lt;/div&gt; &lt;div id="menu"&gt; &lt;div class="pages"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="index.html"&gt;Front Page&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="reviews.html"&gt;Reviews&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="releases.html"&gt;Releases&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="author.html"&gt;About Me&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="contact.html"&gt;Contact Info&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="main"&gt; &lt;div id="content"&gt; &lt;div class="why" id="whyBackground"&gt; &lt;img src="images/reviewsites.png" alt="reviewsites"/&gt; &lt;h1&gt;Why am I doing this?&lt;/h1&gt; &lt;br /&gt; Insert text here &lt;h1&gt;What is my goal?&lt;/h1&gt; Insert text here &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; </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.
 

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