Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I'm developing a site here[^]. I've disabled body scrolling and enabled scrolling on #page, which means I need to assign a height manually. I do this every 500ms by setting the height of #page to $(window).height() minus the page's top and bottom 16px margins, and the header's top and bottom 16px margins and 48px height. This looks fine on Chrome and Opera, but on Firefox and IE, the height is set to a value too high, which cuts off a small area at the bottom.

For debugging, the document title is set to $(window).height() every time this is done.

Why could this be, and is there any way to deal with it consistently rather than having to detect the browser and altering the calculation for each one?

What I have tried:

-------------------------------------------------------------------
Posted
Updated 31-Aug-18 4:44am

1 solution

The site looks the same for me in Chrome, Firefox 61, Edge, and IE11.

If you can drop support for old versions of IE, you might do better with Grid layout - no Javascript required: Demo[^]

Can I use... CSS Grid Layout[^]
A Complete Guide to Grid | CSS-Tricks[^]
Grid by Example[^]
 
Share this answer
 
Comments
[no name] 31-Aug-18 12:01pm    
If you scroll right to the bottom, underneath the 'Written by'... section, there should be a 16px padding. This is cut short on firefox and IE.
Richard Deeming 31-Aug-18 12:09pm    
I can't see it, because your site is now producing a SSL_ERROR_NO_CYPHER_OVERLAP error in all browsers. Have you changed the enabled protocols in the last hour?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900