Jump to content

CSS <content> is overwriting my SVG logo

Go to solution Solved by mrpower,

Recommended Posts

Hi, I have inputted an SVG logo in my header, however only on certain pages the "visibility: hidden !important;" code isn't hiding the original PNG logo. It seems there's some CSS "content: url(…)" that is overwriting the visibility hidden. Resulting in 2 overlapping logos. This content code is tagged as !important and it's proving difficult to target.

How do I hide the image here so only the svg shows?

Site: https://mrwatt.co.uk/work (it works here)

Site issue: https://mrwatt.co.uk/puregym-pride-2019 (overlapping logo)

password: 2121

Thanks

 

Edited by mrpower
wrong url
Link to comment
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

SOLVED: Removed the custom code from the header and included it in the footer.

<!---SVG LOGO--->
<style>
/*Hide PNG Logo*/
.header-title-logo img, .header-mobile-logo img{
      visibility: hidden !important;
  }
  
/*Replace with SVG Logo*/
div.header-title-logo a, .header-mobile-logo a{
    content: url('/file.svg') !important;
      max-width: 290px;
    margin-left: auto;
    margin-right: auto;
</style>

Link to comment

Hi, those are CSS styling code, you can put them here Website -> Website Tools -> Custom CSS. Without the style tags, like below.

Also, not sure if it's just copy and paste error, you're missing the closing } at the end of your code.

/*Hide PNG Logo*/
.header-title-logo img, .header-mobile-logo img{
      visibility: hidden !important;
  }
  
/*Replace with SVG Logo*/
div.header-title-logo a, .header-mobile-logo a{
    content: url('/file.svg') !important;
      max-width: 290px;
    margin-left: auto;
    margin-right: auto;
}

 

-------- > 👆 <---------- Please quote or @ me when replying, or I won't get a notification 

🙋‍♀️Techy SquareSpace Developer for all your customisation needs #CSS #html #javascript

✉️ Email me

💻Soft launch

https://www.melodylee.tech/
A software developer in an artist body that knows how marketing works.
UK based, work globally

#neverstoplearning
 
I like coffee 😊

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.