Jump to content

Trouble with code injection in Courses

Go to solution Solved by tuanphan,

Recommended Posts

I've placed the following code into the page header code injection into the Interview Masterclass course page. It styles the navigation on scroll but is obviously affecting the course levels within the course which I don't want:

<style>
  
  header#header img {
    content: url(https://static1.squarespace.com/static/632334889a72c4229a80d565/t/634fbc80c1d7123d9ee8a4a3/1666169984378/Oppidan+Education+1+Dark.png);
}
  
  .shrink .header-title-logo img {
visibility: hidden;
}
  
.shrink .header-title-logo a {
background-image: url(https://static1.squarespace.com/static/632334889a72c4229a80d565/t/634fbc8686f458657486f7d2/1666169990610/Oppidan+Education+1.png);
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
}
  
body.header--menu-open .shrink .header-title-logo img {
visibility: hidden;
}
  
body.header--menu-open .shrink  .header-title-logo a {
    background-image: url(https://static1.squarespace.com/static/632334889a72c4229a80d565/t/634fbc80c1d7123d9ee8a4a3/1666169984378/Oppidan+Education+1+Dark.png);
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
}
  
  
.shrink .header-nav-item a {
  color: #132a42 !important;
}
  
.shrink .header-actions-action--cta:before {
  color: #132a42 !important;
  }
  
  .header-nav-folder-content a {
  color: #132a42 !important;
}
  
  .shrink .burger {
    -webkit-filter: invert(100%);
    filter: invert(100%);
  }
  
  
.mega-menu-on .header-title-logo img {
visibility: hidden;
}
  
.mega-menu-on .header-title-logo a {
background-image: url(https://static1.squarespace.com/static/632334889a72c4229a80d565/t/634fbc8686f458657486f7d2/1666169990610/Oppidan+Education+1.png);
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
}
  
.mega-menu-on .header-actions-action--cta:before {
  color: #132a42 !important;
  }

  
</style>

 

Link to comment
  • Solution

Change code to this

<style>
  
  body.view-list header#header img {
    content: url(https://static1.squarespace.com/static/632334889a72c4229a80d565/t/634fbc80c1d7123d9ee8a4a3/1666169984378/Oppidan+Education+1+Dark.png);
}
  
  body.view-list .shrink .header-title-logo img {
visibility: hidden;
}
  
body.view-list .shrink .header-title-logo a {
background-image: url(https://static1.squarespace.com/static/632334889a72c4229a80d565/t/634fbc8686f458657486f7d2/1666169990610/Oppidan+Education+1.png);
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
}
  
body.header--menu-open.view-list .shrink .header-title-logo img {
visibility: hidden;
}
  
body.header--menu-open.view-list .shrink  .header-title-logo a {
    background-image: url(https://static1.squarespace.com/static/632334889a72c4229a80d565/t/634fbc80c1d7123d9ee8a4a3/1666169984378/Oppidan+Education+1+Dark.png);
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
}
  
  
body.view-list .shrink .header-nav-item a {
  color: #132a42 !important;
}
  
body.view-list .shrink .header-actions-action--cta:before {
  color: #132a42 !important;
  }
  
body.view-list .header-nav-folder-content a {
  color: #132a42 !important;
}
  
body.view-list .shrink .burger {
    -webkit-filter: invert(100%);
    filter: invert(100%);
  }
  
  
body.view-list .mega-menu-on .header-title-logo img {
visibility: hidden;
}
  
body.view-list .mega-menu-on .header-title-logo a {
background-image: url(https://static1.squarespace.com/static/632334889a72c4229a80d565/t/634fbc8686f458657486f7d2/1666169990610/Oppidan+Education+1.png);
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
}
  
body.view-list .mega-menu-on .header-actions-action--cta:before {
  color: #132a42 !important;
  }

  
</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.