How to show a different desktop and mobile menu logo - Squarespace 7.1

You might want to have one logo shown on desktop and a different one shown when the mobile menu is open.

If you want to make this for one specific page only, then instead of adding the code to the site wide ‘Custom CSS’ then add it instead to the Page > Settings - Advanced Code Injection. If you are using this method the


Site Wide

Add this version to Custom CSS

/* Insert Logo A when the desktop menu is open */
div.header-title-logo a {
content:url("INSERT_IMG_LINK");
max-width: 300px;
margin-left: auto;
margin-right: auto;
}

/* Hide Logo A when the mobile menu is open */
.header--menu-open .header-title-logo a {
content: none;
}

/* Insert Logo B (as a background image) when the mobile menu is open */
.header--menu-open .header-title-logo a {
background-image: url(INSERT_IMG_LINK);
background-size: cover;
background-repeat: no-repeat;
}

Page Specific

Add this version to Page > Settings (Cog Icon) > Advanced > Page Code Injection

<style>
/* Insert Logo A when the desktop menu is open */
div.header-title-logo a {
content:url("INSERT_IMG_LINK");
max-width: 300px;
margin-left: auto;
margin-right: auto;
}

/* Hide Logo A when the mobile menu is open */
.header--menu-open .header-title-logo a {
content: none;
}

/* Insert Logo B (as a background image) when the mobile menu is open */
.header--menu-open .header-title-logo a {
background-image: url(INSERT_IMG_LINK);
background-size: cover;
background-repeat: no-repeat;
}
</style>
Dave Hawkins

As a top tier Squarespace Expert and founder of Made by Dave, I bring over 8 years of Squarespace experience and 200+ bespoke website launches. Our process combines consultancy, design, project management and development for a collaborative and efficient experience with clients like you. Whether you need a new website or updates for your existing site, we'll help you get up and running.

https://madebydave.org
Next
Next

How to hide button on the mobile menu when it’s open - Squarespace 7.1