Jump to content

Mobile header white on main header , black on tab header

Recommended Posts

Site URL: https://gold-caterpillar-an3l.squarespace.com/

I am looking for a solution to custom make the code below to change the mobile header depending if you are in the tab section or not see pictures

the white logo should be on the main header but the black one inside the tab

 

/* Login text to icon */
.user-accounts-text-link {
    color: transparent !important;
    background-image: url(https://images.squarespace-cdn.com/content/v1/622c66f14ab19b7c095ffa06/86a4d741-607d-4472-9410-a795f003ccf1/Asset+2.png);
    background-size: contain;
    background-repeat: no-repeat;
  width: 39px;
  height: 39px;
}
/* Mobile members */
@media screen and (max-width:767px) { .user-accounts-text-link {
    color: transparent !important;
    background-image: 
url(https://images.squarespace-cdn.com/content/v1/622c66f14ab19b7c095ffa06/18025113-2de0-4b4c-a901-57a457aa7c28/11Asset+3.png); 
  background-size: contain;
    background-repeat: no-repeat;
    text-align: center;
    display: block;
    font-size: 30px;
  width: 70px;
  height: 70px;
}
}
/* Mobile members */
@media screen and (max-width:767px){
  .header-title-logo img {
    visibility: hidden;
}
.header-title-logo a {
    background-image: url(https://images.squarespace-cdn.com/content/v1/622c66f14ab19b7c095ffa06/5ba900b6-fa9e-48de-a454-838d2e0cf623/Asset+1.png?format=1500w);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}
}

 

Screen Shot 2022-03-22 at 13.31.20.png

Screen Shot 2022-03-22 at 13.31.15.png

Link to comment

So I have changed to different logos depending on if you are on .mobile or normal view.

On normal view & on .mobile I want the logo to be white. 

BUT then it will be invisible because of the white background in burger menu... However I still want the burger menu to be white. 

So how to I keep the burger menu white & give it my black logo without it affecting .mobile header or .header?

Link to comment
On 3/31/2022 at 8:51 PM, LukGray said:

So I have changed to different logos depending on if you are on .mobile or normal view.

On normal view & on .mobile I want the logo to be white. 

BUT then it will be invisible because of the white background in burger menu... However I still want the burger menu to be white. 

So how to I keep the burger menu white & give it my black logo without it affecting .mobile header or .header?

Edit this code

@media screen and (max-width: 767px) {
    .header-title-logo img {
        visibility:hidden
    }

    .header-title-logo a {
        background-image: url(https://images.squarespace-cdn.com/content/v1/622c66f14ab19b7c095ffa06/5ba900b6-fa9e-48de-a454-838d2e0cf623/Asset+1.png?format=1500w);
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center center
    }
}

to this new code

@media screen and (max-width: 767px) {
    body.header--menu-open .header-title-logo img {
        visibility:hidden;
    }

   body.header--menu-open .header-title-logo a {
        background-image: url(https://images.squarespace-cdn.com/content/v1/622c66f14ab19b7c095ffa06/5ba900b6-fa9e-48de-a454-838d2e0cf623/Asset+1.png?format=1500w);
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center center;
    }
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.