I have a site here: http://staging.seedcreativeacademy.co.uk/blog/ where I have fixed the header.
At the moment, on other pages I have added a top margin in manually to clear the fixed header (so the content doesnt fall behind the header).
However this is getting a little complex so I'm looking for a site wide fix. I came across a way of doing out in JQuery, like so:
jQuery(document).ready(function() {
header_height = $(".site-header").height();
$(".site-inner").css("margin-top", header_height);
});
However, this isn't working. I think it's not working because the fixed .site-header doesn't actually have an assigned height. I think the height is based on the contents and the padding / margin of the contents.
So, is there anyway around this? the header is fixed on ever page so I'm trying to figure out a site wide solution...
Also, the amount of margin needed changes as the pages shrinks for different devices, currently fixed with media queries.
So I guess I need something that can constantly measure the .site-header and apply that number of margin to the .site-inner...
I'm open to any other ideas if this isn't the correct way to approach this.