Page 1 of 1

*SOLVED* Doing a "Sticky" Header on site that uses "Content Place Holder"

Posted: Thu Aug 08, 2019 9:57 pm
by etcbbu
Hello,

Please look at this site from a mobile device like a Smartphone:

https://www.tylersportvehicles.com/

Notice how the header at the top of the page has three objects: a logo, a phone number, and a logo the says "E-Z-Go".

Client needs this Header to "Stay at the top of the user's screen as the user scrolls down the page, on each page of the website".

I am having trouble doing this on a website project where I use "Content Place Holders" on every page of this website, and reference the on MasterPage where this Header sits. This Header is a "Layer" object, and it is set to "Floating".

How would I be able to accomplish this goal of having this Header object "stay at the top of the screen as the user scrolls down the page on the mobile device?

I have tried changing the "Mode" of this Layer to different things like "Docking", "Anchored, "Sticky", etc.; but clearly, this is not working because of course the Content Place Holder and the objects like this around this website are all "Floating" layers.

-etcbbu

Re: Doing a "Sticky" Header on site that uses "Content Place Holder"

Posted: Fri Aug 09, 2019 6:46 am
by Pablo
Did you consider using a (fixed) page header?

Re: Doing a "Sticky" Header on site that uses "Content Place Holder"

Posted: Fri Aug 09, 2019 8:33 pm
by etcbbu
So, are those sort of like "Floating" Layers, in that the Fixed Header will snap to the top of other objects, no matter what?

Also, will it still need to just be on the Masterpage-only? Or, am I going to need to manually insert it on every page so that it snaps up above the "Content Place Holder" that is on every page?

Re: Doing a "Sticky" Header on site that uses "Content Place Holder"

Posted: Fri Aug 09, 2019 10:45 pm
by alan_sh
Why not try it and see.

I use a header on a master page. See test.penninescouts.org.uk for a sample

Alan

Re: Doing a "Sticky" Header on site that uses "Content Place Holder"

Posted: Fri Aug 09, 2019 11:53 pm
by BaconFries
From my understanding you wish the Header and its contents to be "Stationery" (Fixed) at the top, and as the page and its contents scrolls it goes behind the Header?
Examples:
https://www.wysiwygwebbuilder.com/suppor ... asic6.html
https://www.wysiwygwebbuilder.com/suppor ... world.html

Re: Doing a "Sticky" Header on site that uses "Content Place Holder"

Posted: Sat Aug 10, 2019 5:24 pm
by etcbbu
Is there a way to set a Header on a Master Page "Fixed" and "Floating"?

It's functioning ok, but I notice that when I just have it set to "Fixed", I cannot access any menu at the top of the page anymore, because the menu sits as a child on a "Layout Grid" that is set to "Floating".

Re: Doing a "Sticky" Header on site that uses "Content Place Holder"

Posted: Sat Aug 10, 2019 5:32 pm
by etcbbu
Well. Think I got a workaround.

I put another "Floating" Layer at the top of the page (the object name is tylersportvehiclesmasterpage1Layer3) , such that it takes up the exact amount of space that the "Header" takes up, and this sort of pushes down the menu (and then everything else) down far enough such that the Fixed Header doesn't cover up anything anymore.

https://tylersportvehicles.com

Look good to y'all?

--etcbbu

Re: Doing a "Sticky" Header on site that uses "Content Place Holder"

Posted: Sat Aug 10, 2019 6:31 pm
by BaconFries
Yes it looks good. Now, what if the client wants the menu to be "stationery" (fixed) as well. If this is the case then it to must be part of the "Page Header" so it will always be viewable and use able when scrolling.

Re: Doing a "Sticky" Header on site that uses "Content Place Holder"

Posted: Mon Aug 12, 2019 5:04 pm
by etcbbu
Yes sir, I was thinking about that too. So let's think about this:

In that case, I would happily do that. *NOW*, that would mean that I would then lose that thin green bg on the menu, right? Like, if the menu has to be a part of the Header, that menu would then have to lose its thin, green blue ribbon that is its background, correct?

--etcbbu