How set menu and header at top when scrolling ?

bretweb
17 Posts
bretweb posted this 26 August 2019
Ask a Question

Hello
How set menu and header at top when scrolling ?
actually i put this into additionnal html but I dont know the exact nicepage name for menu header and other
<script type jquery(window).scroll(function() { type jquery(window).scroll(function() { var scroll type jquery(window).scroll(function() { type jquery(window).scroll(function() { var scroll if (scroll jquery(".u-header").addclass("tiny");
type jquery(window).scroll(function() { type jquery(window).scroll(function() { var scroll type jquery(window).scroll(function() { type jquery(window).scroll(function() { var scroll if (scroll jquery(".u-header").addclass("tiny"); jQuery(".u-nav-container").addClass("tiny");

            jQuery(".u-logo").addClass("tiny"); 
            jQuery(".sheet").addClass("tiny"); } 
    if (scroll <= 180) { 
            jQuery(".u-header").removeClass("tiny"); 
            jQuery(".sheet").removeClass("tiny");
            jQuery(".u-nav-container").removeClass("tiny");
            jQuery(".u-logo").removeClass("tiny");                                
                                     } });
</script>

and I put aditionnal CSS rules like :
.u-nav-container.tiny {
position: fixed;
top: 5px; left: 0px;
width: 100%;
transition: all 0.5s ease;
-ms-transform: scale(0.8, 0.8 );
-webkit-transform: scale(0.8, 0.8 );
}
.u-header.tiny {
position:fixed!important;
top: 0; left: 0px; height: 100px;
width:100%;
z-index:500!important;
box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5);
transition: all 0.5s ease;
}
.sheet .tiny{
margin-top: 180px!important;
}

.u-logo.tiny{
-ms-transform: scale(0.7, 0.7);
-webkit-transform: scale(0.7, 0.7);
transition: all 0.5s ease;}

Hello How set menu and header at top when scrolling ? actually i put this into additionnal html but I dont know the exact nicepage name for menu header and other &lt;script type jquery(window).scroll(function() { type jquery(window).scroll(function() { var scroll type jquery(window).scroll(function() { type jquery(window).scroll(function() { var scroll if (scroll jquery(&quot;.u-header&quot;).addclass(&quot;tiny&quot;); type jquery(window).scroll(function() { type jquery(window).scroll(function() { var scroll type jquery(window).scroll(function() { type jquery(window).scroll(function() { var scroll if (scroll jquery(&quot;.u-header&quot;).addclass(&quot;tiny&quot;); jQuery(&quot;.u-nav-container&quot;).addClass(&quot;tiny&quot;); jQuery(".u-logo").addClass("tiny"); jQuery(".sheet").addClass("tiny"); } if (scroll <= 180) { jQuery(".u-header").removeClass("tiny"); jQuery(".sheet").removeClass("tiny"); jQuery(".u-nav-container").removeClass("tiny"); jQuery(".u-logo").removeClass("tiny"); } }); </script> and I put aditionnal CSS rules like : .u-nav-container.tiny { position: fixed; top: 5px; left: 0px; width: 100%; transition: all 0.5s ease; -ms-transform: scale(0.8, 0.8 ); -webkit-transform: scale(0.8, 0.8 ); } .u-header.tiny { position:fixed!important; top: 0; left: 0px; height: 100px; width:100%; z-index:500!important; box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5); transition: all 0.5s ease; } .sheet .tiny{ margin-top: 180px!important; } .u-logo.tiny{ -ms-transform: scale(0.7, 0.7); -webkit-transform: scale(0.7, 0.7); transition: all 0.5s ease;}
Vote to pay developers attention to this features or issue.
7 Replies
Order By: Standard | Newest
Support Team
Support Team posted this 26 August 2019

Hi Vivient,

You can use the Sticky option for the header to make it fixed while the page is scrolled.

...................................................
Sincerely,
Hella
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi Vivient, You can use the Sticky option for the header to make it fixed while the page is scrolled. ................................................... Sincerely, Hella Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
bretweb
17 Posts
bretweb posted this 26 August 2019

Ok I done it but i would like to apply a reduction something like :
-ms-transform: scale(0.8, 0.8 );
-webkit-transform: scale(0.8, 0.8 );

can you help me ? what are the class to set ? for header menu and logo

Ok I done it but i would like to apply a reduction something like : -ms-transform: scale(0.8, 0.8 ); -webkit-transform: scale(0.8, 0.8 ); can you help me ? what are the class to set ? for header menu and logo
Support Team
Support Team posted this 26 August 2019

Hi Vivient,

You can find the appropriate classes using the Inspect Element functionality. As an example, you can use this class for the whole sticky header:

.u-sticky, .u-overlap .u-header

It will include nested containers for the logo and the navigation so you could use something like:

.u-sticky, .u-overlap .u-header > .u-logo, .u-sticky, .u-overlap .u-header > nav.u-menu

But note that we do not support custom modifications.

...................................................
Sincerely,
Hella
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi Vivient, You can find the appropriate classes using the Inspect Element functionality. As an example, you can use this class for the whole sticky header: .u-sticky, .u-overlap .u-header It will include nested containers for the logo and the navigation so you could use something like: .u-sticky, .u-overlap .u-header > .u-logo, .u-sticky, .u-overlap .u-header > nav.u-menu But note that we do not support custom modifications. ................................................... Sincerely, Hella Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
bretweb
17 Posts
bretweb posted this 27 August 2019

I would like to reduce the headar and logo when scrolling
I'm using this in test here http://nauticeayachting.fr/nauticea/Accueil.html :
<script type jQuery(window).scroll(function() {

    var scroll = jQuery(window).scrollTop(); 
    if (scroll >= 120) { 
            jQuery(".u-header").addClass("tiny");            
            jQuery("nav.u-menu").addClass("tiny"); 
            jQuery(".u-logo").addClass("tiny");                  
    if (scroll <= 120) { 
            jQuery(".u-header").removeClass("tiny"); 
            jQuery("nav.u-menu").removeClass("tiny");
            jQuery(".u-logo").removeClass("tiny");                                
                                     } });
</script>

and these css class tiny
/begin-variables custom-site-css/
.u-header.tiny{
box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5);
-ms-transform: scale(0.7, 0.7);
-webkit-transform: scale(0.7, 0.7);
transition: all 0.5s ease;}
}
.u-logo.tiny{
-ms-transform: scale(0.7, 0.7);
-webkit-transform: scale(0.7, 0.7);
transition: all 0.5s ease;}
nav.u-menu.tiny{

-ms-transform: scale(0.7, 0.7);

-webkit-transform: scale(0.7, 0.7);
transition: all 0.5s ease;}

but it's not working ... does I 'm missing something ?

just to know :
why are you using u- into the name of css class ?

Thanks for helps

I would like to reduce the headar and logo when scrolling I&#39;m using this in test here http://nauticeayachting.fr/nauticea/Accueil.html : &lt;script type jQuery(window).scroll(function() { var scroll = jQuery(window).scrollTop(); if (scroll >= 120) { jQuery(".u-header").addClass("tiny"); jQuery("nav.u-menu").addClass("tiny"); jQuery(".u-logo").addClass("tiny"); if (scroll <= 120) { jQuery(".u-header").removeClass("tiny"); jQuery("nav.u-menu").removeClass("tiny"); jQuery(".u-logo").removeClass("tiny"); } }); </script> and these css class tiny /*begin-variables custom-site-css*/ .u-header.tiny{ box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5); -ms-transform: scale(0.7, 0.7); -webkit-transform: scale(0.7, 0.7); transition: all 0.5s ease;} } .u-logo.tiny{ -ms-transform: scale(0.7, 0.7); -webkit-transform: scale(0.7, 0.7); transition: all 0.5s ease;} nav.u-menu.tiny{ -ms-transform: scale(0.7, 0.7); -webkit-transform: scale(0.7, 0.7); transition: all 0.5s ease;} but it's not working ... does I 'm missing something ? just to know : why are you using u- into the name of css class ? Thanks for helps
Support Team
Support Team posted this 28 August 2019

Hi,

Usually, we do not provide support for custom code. But please check the browser console. Looks like there is an error in the code. An extra ")".

why are you using u- into the name of css class ?

To avoid conflicts with styles applied by the third-party components to the page elements.

...................................................
Sincerely,
Olivia
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi, Usually, we do not provide support for custom code. But please check the browser console. Looks like there is an error in the code. An extra ")". > why are you using u- into the name of css class ? To avoid conflicts with styles applied by the third-party components to the page elements. ................................................... Sincerely, Olivia Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
ab69.company
1 Posts
ab69.company posted this 14 June 2021

hello, nice page i am editing my website but when i see in the preview, it's not showing me my saved. For example i colored a text back from white but in preview, it will show white why?

hello, nice page i am editing my website but when i see in the preview, it's not showing me my saved. For example i colored a text back from white but in preview, it will show white why?
Support Team
Support Team posted this 14 June 2021

Hello,

Please specify what application are you using to build your website, Nicepage desktop application or Online Editor?
We need more information regarding your issue, some screenshots would be helpful too.

Kindly ask you to create a new topic regarding your issue with details.
Thank you for your cooperation.
...................................................
Sincerely,
Anna T.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hello, Please specify what application are you using to build your website, Nicepage desktop application or Online Editor? We need more information regarding your issue, some screenshots would be helpful too. Kindly ask you to create a new topic regarding your issue with details. Thank you for your cooperation. ................................................... Sincerely, Anna T. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
You must log in or register to leave comments