I have a home page that has a div which has a full screen background image, but the header where the nav is has pushed it down so a scroll bar appears.
Ideally I think I need to push the div up under the header, but I cant seem to get it working in all browsers.
I don’t like magic numbers (116px or 84px). What happens if a user zooms the text size only ?
I’m on a mobile at the moment so can’t look at the html but I would have done this with flexbox set to min-height: 100vh with column alignment.
The nav would be the first div and the main picture would be the second div with flex:1 0 0; which would make it stretch to the bottom. No magic numbers needed and the height of the nav is arbitrary and can change with content.
Note that when you say html,body{height:100%} you will get a scroll bar if you don’t remove the default body margins.