Jump to content

Different Logo mobile for one page

Recommended Posts

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

<style>
  .header-title-logo img {
    visibility: hidden;
}
.header-title-logo a {
    background-image: url(https://static1.squarespace.com/static/62b0a5a84a538a17d67418ad/t/62c60382e29bb52c941acbdf/1657144194409/Asset+1b.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}
  
  
  .header-mobile-logo img {
    content: url(https://static1.squarespace.com/static/62b0a5a84a538a17d67418ad/t/62c888a1556b662c1bbd0cc5/1657309345933/Gradient_Logo%404x.png);;
}

.header-nav-item a[href="/about"], .header-menu-nav-item a[href="/about"], .header-nav-item a[href="/areas-of-practice-1"], .header-menu-nav-item a[href="/areas-of-practice-1"], .header-nav-item a[href="/contact-us"], .header-menu-nav-item a[href="/contact-us"]{
    color: #346D77 !important; 
}
.header-actions .btn {
color: #fff !important;
background-color: #346D77 !important;
}
  
  
</style>

Here is my code on that page. I know why its happening because I target the desktop navigation here to make it the green color (#346D77) but I need a way to target the mobile nav to make it white

Link to comment
2 hours ago, BTD said:
<style>
  .header-title-logo img {
    visibility: hidden;
}
.header-title-logo a {
    background-image: url(https://static1.squarespace.com/static/62b0a5a84a538a17d67418ad/t/62c60382e29bb52c941acbdf/1657144194409/Asset+1b.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}
  
  
  .header-mobile-logo img {
    content: url(https://static1.squarespace.com/static/62b0a5a84a538a17d67418ad/t/62c888a1556b662c1bbd0cc5/1657309345933/Gradient_Logo%404x.png);;
}

.header-nav-item a[href="/about"], .header-menu-nav-item a[href="/about"], .header-nav-item a[href="/areas-of-practice-1"], .header-menu-nav-item a[href="/areas-of-practice-1"], .header-nav-item a[href="/contact-us"], .header-menu-nav-item a[href="/contact-us"]{
    color: #346D77 !important; 
}
.header-actions .btn {
color: #fff !important;
background-color: #346D77 !important;
}
  
  
</style>

Here is my code on that page. I know why its happening because I target the desktop navigation here to make it the green color (#346D77) but I need a way to target the mobile nav to make it white

Use this

<style>
nav.header-menu-nav-list * {
    color: white;
}
</style>

 

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.