Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS widths and columns issue
    primarykey
    data
    text
    <p><em>I can't see what I'm doing wrong here.</em> I'm working with the widths and margins of a three column layout and I want to widen the right sidebar into the white space to the left.</p> <p>But when I increase the width of #sidebar-right above 22%, both sidebars drop down below the content. I'm missing something having to do with the combined widths and margins.</p> <p>HTML and CSS are below the image. This is also a responsive structure, if that makes a difference. I need to stay with this CSS and HTML as it is a WordPress theme, and I don't want to move into another type of CSS column or box structure.</p> <p><strong>Update 10/23/12</strong> <em>I gave up on trying to adapt the current CSS and HTML and changed to box layout model CSS for page templates because the box model works well and I am able to simplify my page templates, too.</em></p> <p>Any ideas?</p> <p><img src="https://i.stack.imgur.com/A6NYn.png" alt="enter image description here"></p> <p><strong>HTML:</strong></p> <pre><code> &lt;body class="three-column"&gt; &lt;div id="page"&gt; &lt;div id="main"&gt; &lt;div id="primary"&gt; &lt;div id="content" role="main"&gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris a eros eu sem sollicitudin vulputate. Maecenas ac ante libero, quis volutpat diam. Etiam eleifend arcu eu enim tincidunt ornare. Sed imperdiet viverra bibendum. Proin a enim et turpis tempus mattis vitae et ipsum. In et ligula eget tellus malesuada pretium sed ut ipsum. &lt;/div&gt; &lt;/div&gt; &lt;div id="sidebar-right"&gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris a eros eu sem sollicitudin vulputate. Maecenas ac ante libero, quis volutpat diam. Etiam eleifend arcu eu enim tincidunt ornare. Sed imperdiet viverra bibendum. Proin a enim et turpis tempus mattis vitae et ipsum. In et ligula eget tellus malesuada pretium sed ut ipsum. &lt;/div&gt; &lt;div id="sidebar-left"&gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris a eros eu sem sollicitudin vulputate. Maecenas ac ante libero, quis volutpat diam. Etiam eleifend arcu eu enim tincidunt ornare. Sed imperdiet viverra bibendum. Proin a enim et turpis tempus mattis vitae et ipsum. In et ligula eget tellus malesuada pretium sed ut ipsum. &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; (some closing divs omitted for clarity). </code></pre> <p><strong>CSS:</strong></p> <pre><code>#page { margin: 1em auto; max-width: 1075px; } #main #secondary { float: none; margin: 0 7.6%; width: auto; } .three-column #page { max-width: 1075px; } .three-column #primary { float: left; margin: 0 -26.4% 0 0; width: 100%; } .three-column #content { margin: 0 34% 0 20%; width: 44%; border:1px solid #c2c2c2; padding:10px; } .three-column #sidebar-right { float: right; margin-right: 1.5%; width: 22%; border:1px solid #c2c2c2; padding:10px; } .three-column #sidebar-left{ position:relative; float: left; width: 15%; margin-left: -72%; border:1px solid #c2c2c2; padding:10px; } </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.
    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