Jump to content

Change size of replaced logo in header

Go to solution Solved by tuanphan,

Recommended Posts

Hi,

I've made some progress by adding some css to set a different header logo for certain pages, but I don't manage to give it the right size to fit it well.

I hope there is somebody who can help me to fit the image well. I'd like to have the second logo a little bit bigger, so the letter size is the same size as the original logo.

Many thanks in advance.

 

Original Logo:image.thumb.png.a43faadaba8439cda96beece45d61140.png

 

Logo replacement:
image.thumb.png.ad3c00c01d7b343c0ec563fa0d2bfb92.png

 

URL of logo: Swoop+headboards.png?format=1500w

 

Used CSS:

<style> 
   /* footer changes*/
   
  section[data-section-id="6594764d466b82593e6b8a3e"] {
    display: none !important;
}

</style>
<style> 
   /* footer changes*/
   
  section[data-section-id="65947861466b82593e6c21bf"] {
    display: none !important;
}

</style>
<style> 
   /* footer changes*/
   
  section[data-section-id="65947837376727511792b4d2"] {
    display: none !important;
}

</style>

<style>
  .header-title-logo img {
    visibility: hidden;
}
.header-title-logo a {
    background-image: url(https://images.squarespace-cdn.com/content/v1/6569f5f4c6270c44fe28fed3/8dd1a38a-9aee-4507-a014-25558223fab5/Swoop+headboards.png?format=1000w);
    background-size: cover;
     max-width: 700px
    background-repeat: no-repeat;
    background-position: center center;
}
</style>

Link to comment
  • Replies 3
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution
On 1/19/2024 at 3:30 PM, Huib said:

Hi,

I've made some progress by adding some css to set a different header logo for certain pages, but I don't manage to give it the right size to fit it well.

I hope there is somebody who can help me to fit the image well. I'd like to have the second logo a little bit bigger, so the letter size is the same size as the original logo.

Many thanks in advance.

 

Original Logo:image.thumb.png.a43faadaba8439cda96beece45d61140.png

 

Logo replacement:
image.thumb.png.ad3c00c01d7b343c0ec563fa0d2bfb92.png

 

URL of logo: Swoop+headboards.png?format=1500w

 

Used CSS:

<style> 
   /* footer changes*/
   
  section[data-section-id="6594764d466b82593e6b8a3e"] {
    display: none !important;
}

</style>
<style> 
   /* footer changes*/
   
  section[data-section-id="65947861466b82593e6c21bf"] {
    display: none !important;
}

</style>
<style> 
   /* footer changes*/
   
  section[data-section-id="65947837376727511792b4d2"] {
    display: none !important;
}

</style>

<style>
  .header-title-logo img {
    visibility: hidden;
}
.header-title-logo a {
    background-image: url(https://images.squarespace-cdn.com/content/v1/6569f5f4c6270c44fe28fed3/8dd1a38a-9aee-4507-a014-25558223fab5/Swoop+headboards.png?format=1000w);
    background-size: cover;
     max-width: 700px
    background-repeat: no-repeat;
    background-position: center center;
}
</style>

Remove this code

<style>
  .header-title-logo img {
    visibility: hidden;
}
.header-title-logo a {
    background-image: url(https://images.squarespace-cdn.com/content/v1/6569f5f4c6270c44fe28fed3/8dd1a38a-9aee-4507-a014-25558223fab5/Swoop+headboards.png?format=1000w);
    background-size: cover;
     max-width: 700px
    background-repeat: no-repeat;
    background-position: center center;
}
</style>

add this new code

<style>
 header#header img{
   content: url(https://images.squarespace-cdn.com/content/v1/6569f5f4c6270c44fe28fed3/8dd1a38a-9aee-4507-a014-25558223fab5/Swoop+headboards.png?format=1000w);
}
</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.