sticky header

sticky header was created by leobrian

Posted 9 years 10 months ago #20342
Hello,
I was wondering how I go about creating a template with a fixed header. I would like the logo / main menu area to remain visible when scrolling down.

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic sticky header

Posted 9 years 10 months ago #20349
Hi
you can use the "custom.css" file and add something like this
Code:
#wrapper1 { position:fixed; top:0; left:0; right:0; }
CEd

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by Boradan on topic sticky header

Posted 9 years 10 months ago #20406
also, if you do this, you need to create a wrapper containing a custom html block with no content above the first of your module positions, but set its height to the height of the fixed header. Otherwise your content starts behind the fixed header - it seems if you make a wrapper fixed, the next wrapper positions itself at the top of the page.
If your fixed wrapper changes height on different viewing devices, you also need to create custom html blocks with the relevant height and make them show on the correct viewing device
by Boradan

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic sticky header

Posted 9 years 10 months ago #20413
or you can add a margin to the second wrapper
the only problem will be if you want your website responsive, you can not adapt the margin (or your emtpy block) and then resizing the screen will not give a correct result. The best way would be to manage also this with some javascript (out of template creator scope)

Joomlack Webmaster and Developer

Last Edit:9 years 10 months ago by ced1870
Last edit: 9 years 10 months ago by ced1870.

Please Log in or Create an account to join the conversation.

Replied by leobrian on topic sticky header

Posted 9 years 10 months ago #20562
Thanks for you help so far. I have tried what you asked:

#topwrapper {
position:fixed;
top:0;
left:0;
right:0;
}

But is doesnt seem to be working. inspection of the live template doesnt show that the custom css has been copied to it properly. should I be applying custom css to the "container" of the "page background"?

here's a link to the page Im working on:

alexavior.net/as2/index.php/home/alexavior-tips/audio-video

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic sticky header

Posted 9 years 10 months ago #20570
for a dedicated help please use the support contact form that comes with your membership if you have choosen to take the support

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Time to create page: 0.708 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 668 guests and no members online