Jump to content

Change to different Logo version for specific pages

Go to solution Solved by tuanphan,

Recommended Posts

Hi,

Website this applies to is: https://fasaderehabilitering.no

I have added the logo in SVG format using this code in the Design panel:

/* Hide the normal logo */
.header-title-logo img, .header-mobile-logo img {
  visibility: hidden !important;
}

/* Set background image to be the SVG logo */
.header-title-logo a, .header-mobile-logo a{
  /* Change the "left" below to "center" or "right" if you want the logo positioned in the middle or on the right */
  background: url("/s/FRlogo-blue.svg") no-repeat left center !important;
  background-size: contain !important;
}

 

My question is: How can I add different versions of the logo to specific pages? For example, I have a page that has a black background, and on this page, I want to add the logo variant that is in white.

Help is appreciated!

Kind regards,

Regont

Link to comment
  • Replies 2
  • Views 161
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

First, you can use this shorter code

header#header img {
	content: url(https://www.fasaderehabilitering.no/s/FRlogo-blue.svg);
}

Next, to apply code on One Page, you can add this to Page Header

<style>
  header#header img {
	content: url(https://www.fasaderehabilitering.no/s/FRlogo-blue.svg);
}
</style>

If you use Basic/Personal Plan, you can edit page > Add a Code Block (anywhere on page) > Paste this code

<style>
  header#header img {
	content: url(https://www.fasaderehabilitering.no/s/FRlogo-blue.svg);
}
</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
  • 2 weeks later...
On 5/1/2023 at 10:54 AM, tuanphan said:

First, you can use this shorter code

header#header img {
	content: url(https://www.fasaderehabilitering.no/s/FRlogo-blue.svg);
}

Next, to apply code on One Page, you can add this to Page Header

<style>
  header#header img {
	content: url(https://www.fasaderehabilitering.no/s/FRlogo-blue.svg);
}
</style>

If you use Basic/Personal Plan, you can edit page > Add a Code Block (anywhere on page) > Paste this code

<style>
  header#header img {
	content: url(https://www.fasaderehabilitering.no/s/FRlogo-blue.svg);
}
</style>

 

Thank you @tuanphan! You are an absolute King!!!

Kind regards,

Regont

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.