Note that there are some explanatory texts on larger screens.

plurals
  1. POif my content is not longer than the viewport then i want a div to expand to fill the gap so that a header can be offscreen
    primarykey
    data
    text
    <p>If my content is not longer than the viewport then I want a div to expand to fill the gap so that a header can be offscreen I will explain a bit better </p> <p>I have site x it is a header with a menu then content - all of which scroll - there is a fixed div at the bottom - 25px high so I have added a div to the bottom of my content of 30px - this allows the bottom-most content to be visible when scrolled to the bottom </p> <p>All pages have a javascript redirect via bookmark to #sectionB - to the menu - so hiding a header banner of about 300px height - on most pages this means content still overflows the viewport - on one or two pages the content is not long enough so the bookmark redirect may only cover 200 or 100px of the header banner </p> <p>An obvious fix would be to make the bottom div larger, but this breaks the nice clean effect on the majority of pages</p> <p><a href="http://www.tpfwales.com/preview/home.html#sectionB" rel="nofollow noreferrer">http://www.tpfwales.com/preview/home.html#sectionB</a> is a page which is longer<br> <a href="http://www.tpfwales.com/preview/info.html#sectionB" rel="nofollow noreferrer">http://www.tpfwales.com/preview/info.html#sectionB</a> is a problem page </p> <p>Is there any way to get javascript to find out the viewport size, compare it to the content size, and if the content size is less than the viewport size - change the value of the div - cbase - at the bottom of the content from 30px to the remanding space plus the height of the header banner </p> <p>Sorry for being a tiny bit confusing in my description of the problem.</p> <p>So we have a header, menu, submenu, content, chase - all of which can scroll and then footer which is fixed to the bottom permanently. when content from menu down is longer that the viewport then a cbase of 30px is perfect - when the content from menu down is not longer than the viewport I would like cbase to be the height or viewport minus content from menu down. if possible this would adjust when the page adjusts.</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.
    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