Jump to content

Five: How can I get logo to display in mobile view?

Recommended Posts

  • 2 months later...
  • 4 months later...

@deanseguin @ana@top5fashion.com

If you want to make it clickable, add this to your site footer injection:

Replace "YOUR URL HERE" with your URL


<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script>
$('#mobile-navigation-title').wrap('<a href="YOUR URL HERE" />');
</script>

I hope this helps! :)

Edited by njensen
Initial Revision

>Hello, I'm Nicole. > I'm new to Squarespace, still finding my way and I hope I can help other users along the way.

Link to comment
  • 11 months later...

i was able to get this code to work by updating the jQuery version.

Settings > Advanced > Code Injection > Footerand entered the following code:


  <script>
 $('#mobile-navigation-title').wrap('<a href="https://www.mytaxband.com/" />');



and i got the jQuery version from this Google Hosted Library page:https://developers.google.com/speed/libraries/

Link to comment
  • 1 month later...
  • 3 weeks later...
  • 3 months later...
  • 1 year later...

I got my mobile nav logo to show up like this, and it still acts as a link to the front page. You just have to add your logo image url(). By adjusting font-size you can adjust image size and bu adjusting label margins you can adjust hamburger menu position. Usage of PNG images with transparent background is suggested of course.

/*Add logo to display in mobile*/
#mobile-navigation-title a {
  color: transparent;
  background-image: url("YOUR_IMAGE_URL_HERE");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  font-size: 2.5em;
}
/*Adjust mobile hamburgernav position*/
#mobile-navigation-label {
  margin-top: 1em;
}

 

Edited by osholopa
Link to comment
  • 6 months later...
  • 1 year later...
On 11/22/2019 at 5:34 AM, osholopa said:

I got my mobile nav logo to show up like this, and it still acts as a link to the front page. You just have to add your logo image url(). By adjusting font-size you can adjust image size and bu adjusting label margins you can adjust hamburger menu position. Usage of PNG images with transparent background is suggested of course.

/*Add logo to display in mobile*/
#mobile-navigation-title a {
  color: transparent;
  background-image: url("YOUR_IMAGE_URL_HERE");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  font-size: 2.5em;
}
/*Adjust mobile hamburgernav position*/
#mobile-navigation-label {
  margin-top: 1em;
}

 

I got this to work for me as well, however I'd like to know the code to get the hamburger menu on the right vs. left side of header. 

Link to comment
On 7/9/2021 at 12:31 PM, vjtk said:

I got this to work for me as well, however I'd like to know the code to get the hamburger menu on the right vs. left side of header. 

Can you share link to your site? We can take a look

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
  • 3 weeks later...
On 7/20/2015 at 11:39 AM, squareology said:

Using @octopus' code with a couple tweaks:

 
#mobile-navigation-title {
     background: url("XXX") no-repeat center;
     text-indent: 100%;
     height:100px;
 }
#mobile-navigation #mobile-navigation-label {
     background:transparent;
     color:black;
}

 

 

You can adjust the mobile navigation button, it was showing up as a black square with grey lines but this way can be a transparent square with black lines. Add it to your Custom CSS Editor. You can upload files directly to the Custom CSS editor for use in the background URL, just replace XXX with the URL of the image file.

I also found that the height didn't expand with the image, so the height needs to be set manually. Use Device View to check how it looks.

Not sure what you mean about the menu being a black square and the height issue, its transparent with white lines on this end using both device view and an actual device (iphone) to check. I replaced the code I had with what you supplied, but the graphic was too large and there was text in the header (although I couldn't see it all on iphone as the logo was so big). 

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.