Note that there are some explanatory texts on larger screens.

plurals
  1. POStatic header + menu, scrollable body
    primarykey
    data
    text
    <p>This is what I'm trying to accomplish:</p> <pre> +--------screen-----------------------+ | ______________________ |*| | |_static_header______| |*| | | | | |*| | | content |menu | |*| | | scrollable |static| |*| | | | | |*| | | | | |*| | | | | |*| +-------------------------------------+ </pre> <p>The content is of variable height, and the content scrollbar must be show in the page body (and not on it's on area). I managed to get the basic idea, but I'm having trouble to getting the content div in it's correct position when the scrollbar shows, and even if I set to always show the scrollbars, I can't use a fixed width because they differ from browser to browser.</p> <pre><code>&lt;div style="position:absolute; background-color:Transparent; left:0px; right:0px; height:100px; z-index:2;"&gt; &lt;div style="background-color:Silver; width:1000px; height:100px; margin:0 auto;"&gt; Header &lt;/div&gt; &lt;/div&gt; &lt;!-- Fixed div acting as the body "page" so the scrollbar shows as the page's --&gt; &lt;div style="position:absolute; left:0px; top:0px; bottom:0px; right:0px; overflow-y:auto; padding-top:100px; z-index:1;"&gt; &lt;div style="position:relative; width:800px; height:100%; margin:0 auto; padding-right:200px;"&gt; &lt;div style="background-color:Orange; width:100%; height:900px;"&gt; Content &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div style="position:absolute; left:50%; right:0px; padding-top:100px; z-index:0;"&gt; &lt;div style="width:500px; float:left;"&gt; &lt;div style="background-color:Green; float:right; width:200px; "&gt; Menu &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>In code above the content is off by the scrollbar width, how can I get it right with the rest of the page (ie. calculating it's position without considering the scrollbar width, even if it has one)?</p>
    singulars
    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