Note that there are some explanatory texts on larger screens.

plurals
  1. POMaking the sidebar height match content area
    primarykey
    data
    text
    <p>So, I'm having trouble with a layout. I would like to have the sidebar reach 100% of the content's height. I've tried tricks other people gave and they didn't work. I don't know if it's because my page layout is slightly different or something but yeah... </p> <p>The code:</p> <pre><code>&lt;div id="page"&gt; &lt;div id="top"&gt; &lt;div id="topwidth"&gt; this is a top bar &lt;/div&gt; &lt;/div&gt; &lt;div id="leftmenu"&gt; this is a fixed floating menu to the left &lt;/div&gt; &lt;div id="wrapper"&gt; &lt;div id="maincontent"&gt; &lt;div class="post"&gt; This is my content area. multiple post divs will be here &lt;/div&gt; &lt;/div&gt;&lt;!-- Main Content--&gt; &lt;div id="sidebar"&gt; Yep... this is where the trouble is; It won't go 100%. &lt;/div&gt; &lt;!-- Sidebar --&gt; &lt;div id="clearfix"&gt; ...I tried this. &lt;/div&gt; &lt;/div&gt; &lt;!-- Wrapper --&gt; &lt;div id="footer"&gt; This is my footer, it's 100% the width of the page. &lt;/div&gt; &lt;!-- Footer --&gt; &lt;/div&gt; &lt;!-- Page --&gt; </code></pre> <p>and the css:</p> <pre><code>* { margin:0px; padding:0px; border:0px; outline:0px; font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; cursor:default; } a { transition: color 1s; -moz-transition: color 1s; /* Firefox 4 */ -webkit-transition: color 1s; /* Safari and Chrome */ -o-transition: color 1s; /* Opera */ } html { height:100%; width:100%; } body { height:100%; width:100%; overflow-y: scroll; } #page { width:100%; display:block; background-color:#FFF; background-image: -moz-linear-gradient(left , #BCBCBC 0%, #FFFFFF 10%, #FFFFFF 90%, #BCBCBC 100%); background-image: -webkit-gradient( linear, left top, right top, color-stop(0, #BCBCBC), color-stop(0.1, #FFFFFF), color-stop(0.9, #FFFFFF), color-stop(1, #BCBCBC) ); } #top { background-color:#6666ff; border-bottom:1px solid #3333ff; height:39px; width:100%; z-index:99; position:fixed !important; box-shadow:0px 5px 10px rgba(50, 50, 50, 0.5); } #wrapper { margin:0px auto; padding-top:50px; width:950px; text-align:center; } #leftmenu { margin-left:-75px !important; z-index:98; height:100%; width:75px; text-align:center; position:fixed; border-right:15px solid #999fff; display:block; background-color:#FFF; background-image: -moz-linear-gradient(left , #f5f5f5 0%, #f5f5f5 95%, #e5e5e5 100%); background-image: -webkit-gradient( linear, left top, right top, color-stop(0, #e5e5e5), color-stop(0.5, #f5f5f5), color-stop(0.95, #f5f5f5), color-stop(1, #e5e5e5) ); background-repeat:no-repeat; box-shadow:0px 0px 10px rgba(50, 50, 50, 0.5); transition: margin-left 0.3s; -moz-transition: margin-left 0.3s; /* Firefox 4 */ -webkit-transition: margin-left 0.3s; /* Safari and Chrome */ -o-transition: margin-left 0.3s; /* Opera */ } #header:hover { margin-left:0px !important; } #maincontent { width:625px; height:100%; float:left; position:relative; } #clearfix { width:100%; clear:both; } #sidebar { width:300px; height:100%; margin-top:5px; position:relative; float:right; } #footer { text-align:center; clear:both; height:100%; width:100%; padding-top:10px; background-image: -moz-linear-gradient(top, rgba(255,255,255,0.001) 0%, rgba(255,255,255,1) 100%); background-image: -webkit-gradient( linear, left top, left bottom, color-stop(0,rgba(255,255,255,0.001)), color-stop(1,rgba(255,255,255,1)) ); } </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