Jump to content

Adding different logos to specific areas

Recommended Posts

Site URL: https://www.timraudies.com

Hi everyone,

I am trying to customise the logos on my website. The default logo for most pages is "red-icon-black-font".

Because I am using a full sized picture  on my homepage, I successfully replaced the logo there with "red-icon-white-font", using some CSS lines.

For my mobile menu however, I would like to use a third "all-white" logo, whenever the menu is opened. I found the following code in another thread, but it seems to not work for me. Maybe someone has a solution?

/**replace logo in mobile menu**/
.headermenu-open  .header-mobile-logo img {
	visibility: hidden !important;
}

.headermenu-open  .header-mobile-logo:after {
	content: '';
	width: 100%;
	height: 100%;
	background-image: url('https://static1.squarespace.com/static/61f81bdfc5909b6ad3e084ce/t/63333d57b35dd064286fbcee/1664302423701/logo-tr-final-white.png') !important;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	visibility: visible;
	position: absolute;
	left: 0;
}

/**replace logo on homepage desktop**/
@media screen and (min-width:767px) {
#collection-6331b66e66d8af27cebe0f08 .header-title-logo img {
content: url(//static1.squarespace.com/static/61f81bdfc5909b6ad3e084ce/t/63332b44e77981111958151c/1664297798409/logo-tr-final-inverted-xl.png) !important;
max-height:inherit !important;

  }
}

/**replace logo on homepage mobile**/
@media screen and (max-width:767px) {
#collection-6331b66e66d8af27cebe0f08 .header-display-mobile .header-title-logo img {
content: url("//static1.squarespace.com/static/61f81bdfc5909b6ad3e084ce/t/63332b44e77981111958151c/1664297798409/logo-tr-final-inverted-xl.png") !important;
max-height:inherit !important;

  }
}

Thanks for any idea.

Link to comment
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

1 hour ago, TimRaudies said:

Site URL: https://www.timraudies.com

Hi everyone,

I am trying to customise the logos on my website. The default logo for most pages is "red-icon-black-font".

Because I am using a full sized picture  on my homepage, I successfully replaced the logo there with "red-icon-white-font", using some CSS lines.

For my mobile menu however, I would like to use a third "all-white" logo, whenever the menu is opened. I found the following code in another thread, but it seems to not work for me. Maybe someone has a solution?

/**replace logo in mobile menu**/
.headermenu-open  .header-mobile-logo img {
	visibility: hidden !important;
}

.headermenu-open  .header-mobile-logo:after {
	content: '';
	width: 100%;
	height: 100%;
	background-image: url('https://static1.squarespace.com/static/61f81bdfc5909b6ad3e084ce/t/63333d57b35dd064286fbcee/1664302423701/logo-tr-final-white.png') !important;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	visibility: visible;
	position: absolute;
	left: 0;
}

/**replace logo on homepage desktop**/
@media screen and (min-width:767px) {
#collection-6331b66e66d8af27cebe0f08 .header-title-logo img {
content: url(//static1.squarespace.com/static/61f81bdfc5909b6ad3e084ce/t/63332b44e77981111958151c/1664297798409/logo-tr-final-inverted-xl.png) !important;
max-height:inherit !important;

  }
}

/**replace logo on homepage mobile**/
@media screen and (max-width:767px) {
#collection-6331b66e66d8af27cebe0f08 .header-display-mobile .header-title-logo img {
content: url("//static1.squarespace.com/static/61f81bdfc5909b6ad3e084ce/t/63332b44e77981111958151c/1664297798409/logo-tr-final-inverted-xl.png") !important;
max-height:inherit !important;

  }
}

Thanks for any idea.

Do you need help only on mobile display  for the logo?

Is it fine for you with this when opening menu on mobile?

image.png.728d7a00eb35ca0e885832b60734c98c.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
22 minutes ago, bangank36 said:

Do you need help only on mobile display  for the logo?

Is it fine for you with this when opening menu on mobile?

Hi bangank36, thanks for your reply!

Just inverting the logo doesn't really fit my branding, I would prefer to make it "all-white".

I found this squarespace website in another thread where it seems to work, so I am convinced there must be a way. Do you have any other idea?

 

Link to comment
On 9/28/2022 at 9:14 PM, TimRaudies said:

Hi bangank36, thanks for your reply!

Just inverting the logo doesn't really fit my branding, I would prefer to make it "all-white".

I found this squarespace website in another thread where it seems to work, so I am convinced there must be a way. Do you have any other idea?

 

Add this to Design > Custom CSS

body.header--menu-open header#header img {
    filter: brightness(0) invert(1);
}

image.png.384692517ab7691b1f3143c5e016be3a.png

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.