Change the Logo, Menu, Text and the Header Background when Scrolling in Elementor

Поделиться
HTML-код
  • Опубликовано: 25 авг 2024
  • Make your Header Logos, Background Colours, Text, and more change colour or image with simple CSS! In fact - you can apply this anywhere on your site! Jolly Good Show!
    What if you have a transparent background that needs to change to a solid/or semi-transparent colour? Now you can!
    Rather than use a separate plugin or the Theme's header - you can change it all with Elementor. Have fun!
    Here's the Code I used:
    /* Change the Background Colour on Scroll */
    .elementor-sticky--effects {
    background: #ffffff!important;
    }
    /* The scroll-logo is currently off.*/
    .scroll-logo {
    display: none;
    }
    /* Shut this logo off and activate the other logo after scroll*/
    .elementor-sticky--effects .scroll-logo {
    display: inline-block;
    }
    .elementor-sticky--effects .original-logo {
    display: none;
    }
    /* Change Text Colour and Links colour */
    .elementor-sticky--effects .menutextcolours ul li a {
    color: #000000!important;
    }
    PS: websquadron.co.uk
    PPS: Don't miss out on our amazing Create a Website in One Weekend Course - and it comes with a FREE Elementor Pro License!! websquadron.co...
    PPPS: Contact us for any questions, new videos, hates/likes/love or to collaborate: info@websquadron.co.uk
    PPPPS: I must stress that we only build with Elementor and no other Page Builder.

Комментарии • 133

  • @websquadron
    @websquadron  3 года назад +1

    CSS Code:
    /* Change the Background Colour on Scroll */
    .elementor-sticky--effects {
    background: #ffffff!important;
    }
    /* The scroll-logo is currently off.*/
    .scroll-logo {
    display: none;
    }
    /* Shut this logo off and activate the other logo after scroll*/
    .elementor-sticky--effects .scroll-logo {
    display: inline-block;
    }
    .elementor-sticky--effects .original-logo {
    display: none;
    }
    /* Change Text Colour and Links colour */
    .elementor-sticky--effects .menutextcolours ul li a {
    color: #000000!important;
    }

  • @akinsanmitaiwo7125
    @akinsanmitaiwo7125 6 месяцев назад +1

    Thanks a million. Just used this after doing several searches.

  • @okwebsitedesign7156
    @okwebsitedesign7156 7 месяцев назад +1

    Thank you

  • @tadmedialtd
    @tadmedialtd 2 года назад +1

    you are the man - looked for ages on this and could not find it. Thank you so much. Works like a dream. Well done A++

  • @Nagi2626
    @Nagi2626 7 месяцев назад

    Thanks your video helps me alot😊😊

  • @pabloibarguren6236
    @pabloibarguren6236 2 года назад +1

    it took me just one video to know that I have to subscribe to this channel... well done !

  • @MichelleOnPointTV
    @MichelleOnPointTV 2 года назад +1

    THANK YOU!! Your cheat saved my day!!! Been trying to figure this out for hours! Finally worked!

  • @OManoBlox
    @OManoBlox 10 месяцев назад +1

    Hey perfect tutorial, thanks a lot from Brazil !!

  • @SalphuricAcid
    @SalphuricAcid 5 месяцев назад

    THIS IS AN AMAZING AND SIMPLE SOLUTION THANK YOU BROTHER... IT IS HELPFULL FOR ME THANKS AGAIN FOR SHARING THIS AMAZING PEACE OF CODE AND METHOD......

  • @luckymash9415
    @luckymash9415 Год назад +1

    Thank you so much!

  • @jessicaberggrun534
    @jessicaberggrun534 2 года назад +1

    This is awesome, thank YOU!

  • @shalimmora2015
    @shalimmora2015 Год назад

    Youuuuuuuuuuu!, thank you very much

  • @csmacnee
    @csmacnee 3 месяца назад +1

    Hi - great video and all working though how do I set the sticky scrolling or effects offset as the CSS snippet overrides the Elementor Pro settings. Thanks you have saved me a few times - Cheers

  • @canada4ever853
    @canada4ever853 3 года назад +1

    so simple!! Thanks

  • @honeywavecreative2762
    @honeywavecreative2762 2 года назад +1

    great splanation and simple coding. Thanks!

  • @ayushmanjena5362
    @ayushmanjena5362 3 года назад +2

    best video. Keep making it bro

  • @Alex-nn4qz
    @Alex-nn4qz 2 года назад +1

    Such a nicer way of doing this than other solutions! nice stuff. Would be good to see some transitions too...

    • @websquadron
      @websquadron  2 года назад +1

      Thanks - I have an updated video coming out on 25th April :)

  • @gabrispinelli
    @gabrispinelli Год назад +1

    Hii! Thanks for the video! I'm wondering how to change the hamburger color as well because that code doesn't work in responsive. Could you help, please?

    • @websquadron
      @websquadron  Год назад

      It should do, unless you're using a @media prefix?
      Make sure that the Nav Menu Toggle has no colour applied in Style, and instead add to the CSS for the Initial Colour and then the 'after' colour when you scroll.

    • @ioannapanali7576
      @ioannapanali7576 Год назад

      @@websquadron Hi! thanks for your help, you are amazing! I have the same problem with Gabriella...could you tell me more specifically what to do because I'm new and I don't know what code I should use...

  • @liamswordpresstutorials
    @liamswordpresstutorials 3 года назад +1

    Amazing thanks!

  • @doctor-dan
    @doctor-dan 2 года назад +1

    Great video!

  • @lucascouto8721
    @lucascouto8721 2 года назад +1

    You're the best!!!!

  • @yonatanmizrahi6878
    @yonatanmizrahi6878 Год назад

    hello! thanks for the patient, my problem is - at the moment i pasted the code, the logo and the background appear as the scroll ones (״scroll-logo״ with white background), even tho i'm at the top of the page before scrolling. and then nothing happen when i scroll

    • @websquadron
      @websquadron  Год назад

      Have you added an Offset Effects value?

    • @yonatanmizrahi6878
      @yonatanmizrahi6878 Год назад

      @@websquadron no! just did! it's works.. thank you!
      can i also add shadow just after scroll?

  • @StephenPiddingtonLongbow
    @StephenPiddingtonLongbow 5 месяцев назад

    Thanks, this is really useful. I have one small problem, though, which is that I have an icon box with a title, and the colour does not change when I scroll, even though I gave it the class menutextcolours. I set it to white initially, in the style settings. (I tried it with social icons to replicate what you did, but I still get the same problem.)

    • @StephenPiddingtonLongbow
      @StephenPiddingtonLongbow 5 месяцев назад

      Do you have any advice about that?

    • @StephenPiddingtonLongbow
      @StephenPiddingtonLongbow 5 месяцев назад

      (It doesn't have to be an icon - I just want to add a phone number. I tried plain text but the colour change still doesn't work.)

  • @sabinodargenio
    @sabinodargenio 6 месяцев назад

    Thanks a lot! I have a question though. I would like to hide the menu and then as I scroll down I would like the menu back in the header. At the moment I can only achieve the opposite and I don't understand why. Any help would be appreciated :)

    • @websquadron
      @websquadron  6 месяцев назад

      Can you clarify that.
      So initially the menu in the header can be seen, or is it invisible until you scroll?

  • @Painfultones
    @Painfultones 5 месяцев назад

    Can you help me, I tried it but it doesn't work, when i duplicated the logo and put the css ID in each one and applied the css code to the main section it just add a white color in the background, the logos still the same above each others, the original logo don't disappear and the menu text's color doesn't change

    • @websquadron
      @websquadron  5 месяцев назад

      Due to the high number of daily requests, I don’t investigate or propose possible solutions unless they're a 1-2-1 consultation.
      If you're still interested, visit my booking page: learn.websquadron.co.uk/#support

  • @user-mk9ve6ps3q
    @user-mk9ve6ps3q 2 года назад +1

    argh, love this solution - but my background is set to transparent yet still shows as white at the top (I have swapped the colours over on your code as I want it to scroll to a black background on scroll)

    • @websquadron
      @websquadron  2 года назад +1

      Might need you to add a negative margin to the page section so that it overlaps (or goes under) the transparent header.
      Or add a negative bottom margin to the header so that it’s always over the page sections.

  • @franktielemans6624
    @franktielemans6624 2 года назад +1

    You don't have to upload a black version and hide the white one when you use filter: invert(1).

    • @websquadron
      @websquadron  2 года назад +1

      Good tip. I’ll try that.

  • @websquadron
    @websquadron  3 года назад +1

    Add this to your Section > Advanced > Custom CSS >
    /* Change the Background Colour on Scroll */
    .elementor-sticky--effects {
    background: #ffffff!important;
    }
    /* The scroll-logo is currently off.*/
    .scroll-logo {
    display: none;
    }
    /* Shut this logo off and activate the other logo after scroll*/
    .elementor-sticky--effects .scroll-logo {
    display: inline-block;
    }
    .elementor-sticky--effects .original-logo {
    display: none;
    }
    /* Change Text Colour and Links colour */
    .elementor-sticky--effects .menutextcolours ul li a {
    color: #000000!important;
    }

  • @chrishodson2748
    @chrishodson2748 2 года назад +2

    Thanks for this - really useful. How would you add a transition ease effect to this?

    • @websquadron
      @websquadron  2 года назад +1

      Thanks. See this updated version: ruclips.net/video/EIkXhekBmKY/видео.html
      transition: 0.5s ease-in-out;

    • @chrishodson2748
      @chrishodson2748 2 года назад +1

      @@websquadron Thanks - where in the code would be best to add the 'transition: 0.5s ease-in-out;' line?

    • @websquadron
      @websquadron  2 года назад +1

      @@chrishodson2748 Hi
      Can you paste your current code that you're using here.

    • @chrishodson2748
      @chrishodson2748 2 года назад

      @@websquadron Sure. Currently using:
      /* Change the Background Colour on Scroll */
      .elementor-sticky--effects {
      background: #ffffff!important;
      }
      /* The scroll-logo is currently off.*/
      .scroll-logo {
      display: none;
      }
      /* Shut this logo off and activate the other logo after scroll*/
      .elementor-sticky--effects .scroll-logo {
      display: inline-block;
      }
      .elementor-sticky--effects .original-logo {
      display: none;
      }
      /* Change Text Colour and Links colour */
      .elementor-sticky--effects .menutextcolours ul li a {
      color: #1C244B!important;
      }

    • @websquadron
      @websquadron  2 года назад +1

      @@chrishodson2748 I would add it for each part.
      so...
      /* Change the Background Colour on Scroll */
      .elementor-sticky--effects {
      background: #ffffff!important;
      transition: 0.5s ease-in-out;
      }

  • @cipher893
    @cipher893 Год назад

    What could the reason being behind the sticky menu not working in edge anymore?

    • @websquadron
      @websquadron  Год назад

      No reason. Which theme are you using?

  • @stevechong65
    @stevechong65 2 года назад +1

    Hey Imran, thanks for the tutorial, I was wondering if it was possible to do it in Elementor Free + Header/Footer Bulder for Elementor? Lots of people are using this combination. Thanks in advanced.

    • @websquadron
      @websquadron  2 года назад +2

      Could be done with the Header and Footer Builder Plugin.

    • @stevechong65
      @stevechong65 2 года назад

      @@websquadron I was stuck on the scroll offset, HT Builder plugin didn't have this function.

  • @sergiopoledri4375
    @sergiopoledri4375 Год назад +1

    Hey @websquadron, I put all the code in "@media only screen and (max-width: 420px)" and it works initially but turns off after very little scrolling, the header returns to normal. What do you think it depends on?
    Your videos are very valuable, keep it up man!

    • @websquadron
      @websquadron  Год назад +2

      Hmmmm... Let me have a play later this week with revisiting this.

  • @yourinieuwenburg7716
    @yourinieuwenburg7716 5 дней назад

    This works amezing with Elementor Pro's: Wordpress menu. Only with Elementor Pro's: menu option, it doesnt. Do you know why?

    • @websquadron
      @websquadron  5 дней назад

      That's because of different class names for the Mega Menu

    • @yourinieuwenburg7716
      @yourinieuwenburg7716 5 дней назад

      @@websquadron How can i fix it?

  • @riegaldutoit5792
    @riegaldutoit5792 Год назад

    hello can you make a tutorial on how to change the drop-down menu button for phone i mean when you press on the drop down button then there is a background how can i change the color of the bacground

    • @websquadron
      @websquadron  Год назад

      We’ve done videos on pop up off canvas menus and you could style the drop downs in the style tab. You may need to add some css if you want to just target the drop-down part of the nav menu. Use SiteOrigins CSS (free plugin) to help you write the code.

  • @digitalisierungsagentursachsen
    @digitalisierungsagentursachsen 10 месяцев назад

    Hi, thank you a lot for this video! I have a quick question: I have a hover effect on the menu while it is on top. But when I scroll down and the color changes, the hover effect is gone. Is there any way to keep it, or add an additional hover effect?

    • @websquadron
      @websquadron  10 месяцев назад

      That would need some thinking.

  • @webstudio22
    @webstudio22 Год назад

    Amazing! Thanks a lot! how can i change the color of menu item divider on scroll?

    • @websquadron
      @websquadron  Год назад

      Inspect to get the class name and then add that to the code.

  • @yonatanmizrahi6878
    @yonatanmizrahi6878 Год назад

    thank you! for respond, its working well, i wanted to ask if i can also add a shadow value also only after scroll..
    thanks in advance!

    • @websquadron
      @websquadron  Год назад

      You could with some css again where box-shadow appears

    • @yonatanmizrahi6878
      @yonatanmizrahi6878 Год назад

      @@websquadron can you be more specific by what should i write?

  • @leomarkconstantino4451
    @leomarkconstantino4451 Год назад

    HI, I have a 3D glb file and I put model viewer... When I scroll down the 3d is there but I want it to mve side by side while I am scrolling down the site while the content are there. Is that possible?

    • @websquadron
      @websquadron  Год назад +1

      You may need to use gsap or a motion plugin to get the exact motion effect

  • @hoomanrashidpour8173
    @hoomanrashidpour8173 Год назад

    Hi, thank you for your time, I copied the code but when I put name for cass classes the original logo disappear instead of scroll logo

    • @websquadron
      @websquadron  Год назад +1

      Are you following the video in the order that I built it?

  • @ace_design_education
    @ace_design_education Год назад

    Hi - thanks for the video. If I want the colour change to be only on one section of the page, how could I go about that? For instance, if I have a black menu with a white page background, but in one section the background is black, how would you suggest going about making the menu white only for that section?

    • @websquadron
      @websquadron  Год назад +1

      This is a tricky one and would need a JS listener added where it detects the section and then adapts the colour. You'll need some expert coding for that.

  • @javiergutierrezsanchez4336
    @javiergutierrezsanchez4336 Год назад

    Hi Web Squadron, I have another quick question: in the video we change the color of the text to black when we scroll, but I have a submenu that should remain white when I hover, and with the code I get all black, how could I put an exception that only affects the submenu? Thank you again!

    • @websquadron
      @websquadron  Год назад +1

      Hi, this is where you will need to inspect and get the Class name of the Main Text, and the Sub Text, and then make sure that only the Main Text is affected.

    • @javiergutierrezsanchez4336
      @javiergutierrezsanchez4336 Год назад

      @@websquadron Thank you!!

  • @andymathysphotography1998
    @andymathysphotography1998 2 года назад +1

    Hi, is it also possible to change the background if the background is an image and not a color?

    • @websquadron
      @websquadron  2 года назад +1

      Let me think about that one.

    • @andymathysphotography1998
      @andymathysphotography1998 2 года назад

      @@websquadron Please let me know if you will find a solution. I was thinking to use background-image in the css or maybe make two headers, on of them transparent and the other one with a bg image

  • @takatruong33
    @takatruong33 2 года назад

    I also want to add hover effect to the header the color change when hovered too

    • @websquadron
      @websquadron  2 года назад +1

      Have you tried adding selector:hover {background-color: #ffffff} on the column?

  • @Miguelonxgramage
    @Miguelonxgramage 2 года назад +1

    Good video! Subscribed
    What code would you use to do the same with the search engine and shopping cart?
    Thanks,

    • @websquadron
      @websquadron  2 года назад +2

      I wouldn’t use code for that and instead the 3.5 cart and checkout widgets or ShopEngine

  • @javiergutierrezsanchez4336
    @javiergutierrezsanchez4336 Год назад

    Great video !!! Thank you very much from Spain! I have already subscribed to your channel :) I have a question, can you add shadow exclusively to the menu when it changes to white? Because if I add it the normal "box shadow" appears at the beginning when it is transparent and it looks pretty bad.... Thank you very much again!

    • @websquadron
      @websquadron  Год назад +1

      You would need to add it as CSS rather than using the style tab.
      Let's say you want to create a box shadow with a horizontal offset of 2 pixels, a vertical offset of 4 pixels, a blur radius of 6 pixels, and a colour of black.
      selector {
      box-shadow: 2px 4px 6px black;
      }

    • @javiergutierrezsanchez4336
      @javiergutierrezsanchez4336 Год назад

      @@websquadron The shadow is still visible at the beginning... do you know where I should place the code so that it is only visible when you scroll? Sorry I know very little of coding.... Thank you very much!!

    • @websquadron
      @websquadron  Год назад +1

      @@javiergutierrezsanchez4336 You need to add this at the start of the code .elementor-sticky--effects

    • @javiergutierrezsanchez4336
      @javiergutierrezsanchez4336 Год назад

      @@websquadron You are the best!!

    • @jodiiiix
      @jodiiiix Год назад

      @@websquadron Can you maybe put the full code for me? I tried it by putting it after the sticky-efects but it doesnt work..
      I think i do something wrong.
      /* Change the Background Colour on Scroll */
      .elementor-sticky--effects selector {
      box-shadow: 2px 4px 6px black;
      }{
      background: #ffffff!important;
      }
      /* The scroll-logo is currently off.*/
      .scroll-logo {
      display: none;
      }
      /* Shut this logo off and activate the other logo after scroll*/
      .elementor-sticky--effects .scroll-logo {
      display: inline-block;
      }
      .elementor-sticky--effects .original-logo {
      display: none;
      }
      /* Change Text Colour and Links colour */
      .elementor-sticky--effects .menutextcolours ul li a {
      color: #000000!important;
      }

  • @sebastianodibusti
    @sebastianodibusti 2 года назад

    Thanx a lot for your sharing, I need to change 6 diferent color menu, I have a vertical scrolling website, Im i need change the menu color in 6 diferents sections, how I can do that? thanx mate

    • @websquadron
      @websquadron  2 года назад +1

      You’ll need to add some css with js to trigger changes based on VH of the entire page. You’ll need a coder for that.

  • @mr_oizofpv4432
    @mr_oizofpv4432 10 месяцев назад

    doesn't work anymore with containers .

    • @websquadron
      @websquadron  10 месяцев назад

      Did you not see this: ruclips.net/video/J8d4yVBQk9M/видео.htmlfeature=shared

  • @floraohara3342
    @floraohara3342 2 года назад

    Do you have a tutorial on how to - say move a button that was in the top menu into the scroll menu?

    • @websquadron
      @websquadron  2 года назад +1

      Do you mean a button that’ll now appear in the mobile toggle?
      You’d just create an alternate menu and assign that to the mobile nav menu and responsively hide that on the desktop

  • @WileyChandler-po4pw
    @WileyChandler-po4pw Год назад +1

    Hey! Awesome tutorial. Is there an easy way to replicate this effect when hovering over the menu/header? It'd be great if both effects functioned simultaneously!

    • @websquadron
      @websquadron  Год назад +3

      You could add a Class Name to the Section.
      Let's call it abcd.
      Then, inside the Custom CSS for the Section, you'd write:
      .abcd:hover {add the changes;}
      So let's say that you want it to go from Black to White.
      .abcd {backgroud-color: #000;}
      .abcd:hover {background-color: #fff;}

    • @WileyChandler-po4pw
      @WileyChandler-po4pw Год назад

      @@websquadron Awesome! Thanks for the quick response. I'll give it a go!

    • @WileyChandler-po4pw
      @WileyChandler-po4pw Год назад

      @@websquadron I also noticed that there's a short delay with the menu items changing colors. Is there a way to remove that crossfade or 'fade in/out' so that the change between colors immediate?

  • @jackh1137
    @jackh1137 Год назад

    Great tutorial! Works great except I cannot get the background color to change from transparent to white. Any suggestions?

    • @websquadron
      @websquadron  Год назад +1

      Are you adding the colour ?

    • @jackh1137
      @jackh1137 Год назад

      @@websquadron yes in the css. Logos change, menu text color changes, but background stays transparent.

    • @jackh1137
      @jackh1137 Год назад

      Figured it out. This code is from the descirption -
      /* Change the Background Colour on Scroll /
      .elementor-sticky--effects {
      background: #ffffff!important;
      }
      It is missing an * after the word Scroll. The code in the comments section is correct. Works like a champ now!!! Thanks!!

  • @nathanlenas8671
    @nathanlenas8671 Год назад

    Does it work on shopify as well?

  • @rg-web-design
    @rg-web-design 2 года назад +1

    Where is the CSS code to copy?

    • @websquadron
      @websquadron  2 года назад +2

      Ohhhhhh!
      /* Change the Background Colour on Scroll */
      .elementor-sticky--effects {
      background: #ffffff!important;
      }
      /* The scroll-logo is currently off.*/
      .scroll-logo {
      display: none;
      }
      /* Shut this logo off and activate the other logo after scroll*/
      .elementor-sticky--effects .scroll-logo {
      display: inline-block;
      }
      .elementor-sticky--effects .original-logo {
      display: none;
      }
      /* Change Text Colour and Links colour */
      .elementor-sticky--effects .menutextcolours ul li a {
      color: #000000!important;
      }

    • @websquadron
      @websquadron  2 года назад +1

      PS added the the Description too :)

    • @rg-web-design
      @rg-web-design 2 года назад +1

      @@websquadron Cheers!

    • @websquadron
      @websquadron  2 года назад +2

      @@rg-web-design Many thanks for alerting me !

  • @WileyChandler-po4pw
    @WileyChandler-po4pw Год назад

    Here's another question for you: How do I replicate this function on the tablet and mobile headers?!

    • @websquadron
      @websquadron  Год назад +1

      You may need to use @media queries

  • @sylvias.3380
    @sylvias.3380 Год назад

    Thank you so much! Unfortunately the code is not for a responsive website. :-(

    • @websquadron
      @websquadron  Год назад +1

      Have you tried to add the @media css bits before to make it work better for the screen.

    • @sylvias.3380
      @sylvias.3380 Год назад

      @@websquadron I don't understand. Where i have to put the tag @media in your code?

  • @logarik7645
    @logarik7645 2 года назад

    Love u guy, my hero!
    But I want to set the transition time of background-color, how to do this?

    • @websquadron
      @websquadron  2 года назад +1

      You can add some Transition CSS; 0.5s

    • @logarik7645
      @logarik7645 2 года назад +1

      @@websquadron tks, it worked
      love u bro

  • @xavigarcia6207
    @xavigarcia6207 Год назад

    doesnt work

    • @websquadron
      @websquadron  Год назад

      Are you using the updated video with containers?

  • @victorbonanho1980
    @victorbonanho1980 2 года назад

    I think it is not working anymore :(

    • @websquadron
      @websquadron  2 года назад +1

      Not working how? All of the css? I was using this last week.

    • @victorbonanho1980
      @victorbonanho1980 2 года назад +1

      @@websquadron Found the error, should go to moving effects and change to 1 in the main section

  • @marekfilka3023
    @marekfilka3023 2 года назад +1

    Hey man, it hellped me, thank you. Iam only courious about one think. If you make your header white on scroll, and then you have section down bellow hero section that is white background its not gonna look OK. How to put a shadow whit that scroll white bg?

    • @websquadron
      @websquadron  2 года назад

      You could add a shadow border to the white section

    • @websquadron
      @websquadron  2 года назад +1

      Could add a shadow border to the white section :)