midatan
Forum Replies Created
-
I just realised that you can actually leave out one line of code since it would just create an additional placeholder everytime the site is resized.
So this is the code you should go with:
jQuery("#header-main").wrap('<div class="header-platzhalter")></div>'); //Placeholder is created jQuery(".header-platzhalter").height(jQuery("#header-main.header-bottom").outerHeight()); //Placeholder is set to the height of the header window.onresize = function() { jQuery(".header-platzhalter").height(jQuery("#header-main.header-bottom").outerHeight()); }Wow thank you very much! This fortunately fixed the issue.
For everybody else:
Open the theme’s de_DE.po file in poedit and then select: file -> create MO-File and override the theme’s de_DE.mo file.
So this is the code I added inside the the jQuery section to the file ascent/includes/js/enable-sticky-header.js:
jQuery("#header-main").wrap('<div class="header-platzhalter")></div>'); //Platzhalter wegen des fixierten Headers jQuery(".header-platzhalter").height(jQuery("#header-main.header-bottom").outerHeight()); window.onresize = function() { jQuery("#header-main").wrap('<div class="header-platzhalter")></div>'); //Platzhalter wegen des fixierten Headers jQuery(".header-platzhalter").height(jQuery("#header-main.header-bottom").outerHeight());}Regarding the css code I told you to edit I was wrong since I think there’s no need to do so this way.
Let me now if it works for you.
Greets
Nick
Hey,
I managed this by editing the sticky header javascript file and adding some custom css.
You basically have to create some kind of placeholder for the header because the header reduces the size of the page when it’s set to the attribute “fixed” as soon as you have scrolled down far enough.See this tuorial for more help
I can show you the code later if you want.
Cheers