Note that there are some explanatory texts on larger screens.

plurals
  1. POElements get inside each other
    primarykey
    data
    text
    <p>I'm developing a simple css theme and i'm using left-center-right layout, I am using <code>float</code> for positioning the right and left elements, and <code>margin</code> for the center. But if I take a look at the website, all the website parts are getting inside each other. <br> <br>Here is what I've got right now:</p> <h1>HTML</h1> <pre><code>&lt;div class="container"&gt; &lt;div class="right"&gt; &lt;div class="block"&gt; &lt;div class="title"&gt;My Block Of Data Here Is Title&lt;/div&gt; This is my block of data! Here i can show website stats and announcements. &lt;/div&gt; &lt;/div&gt; &lt;div class="left"&gt; &lt;div class="block"&gt; &lt;div class="title"&gt;My Block Of Data Here Is Title&lt;/div&gt; This is my block of data! Here i can show website stats and announcements. &lt;/div&gt; &lt;/div&gt; &lt;div class="center"&gt; &lt;div class="block"&gt; &lt;div class="title"&gt;Welcome to SITE_TITLE_HERE!&lt;/div&gt; This is where we post so many stuff!&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks, SITE_TITLE_HERE stuff. &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <h1>CSS</h1> <pre><code>body{ font-family: 'Open Sans Condensed', sans-serif; font-size: 18px; } .container{ margin: 0 auto; width: 65%; } .left{ float: left; width: 20%; } .right{ float: right; width: 20%; } .center{ margin: 0 auto; width: 60%; } .block{ width: 100%; padding: 3px; background: #fafafa; outline: 1px solid #f2f2f2; outline-offset: 2px; text-align: center; } .block .title{ font-size: 24px; border-bottom: 1px solid #000; background: #76E0EE; } </code></pre> <p>Fiddle: <a href="http://jsfiddle.net/XK6dN/2/" rel="nofollow">http://jsfiddle.net/XK6dN/2/</a></p> <p>Update: I'm almost sure it's the <code>outline</code> of the block class, but even if it's that. how can I keep them from overriding each other ?</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