Jump to content

Mobile Navigation Half Width

Recommended Posts

Site URL: https://www.BAHFineArt.com

Hello!  I'm trying to make the:

  1. Mobile Navigation menu appear half width (in mobile view only) like the one pictured below. 
  2. Additionally, how can I make it open and overlap the rest of the page? 
  3. Make the rest of the page semi transparent when open? 
  4. Reduce font size when open?
     

Of course I would also love to reduce the font size, all mobile only.   Thank you so much!!!

 

mobile nav.PNG

Edited by DevonHarris
formatting
Link to comment
  • 2 weeks later...

@DevonHarris

I will make a blog post on this but here is some code that I think will create the effect you are looking for. This code is written for Squarespace 7.1. 

.header-menu {
  width: 60vw;  /*width of the header menu */
}
#page {
  transition: opacity 1s; /* transparency animation */
}
.header--menu-open #page {
  opacity: 30%;  /* makes page transparent when mobile menu is open */
}

.header-menu-nav-folder-content {
  justify-content: flex-start; /* vertical alignment of navigation */
  text-align: left; /* navigation text alignment */
}

.header-menu-cta {
  width: 60vw; /* width of button */
}
.header-menu-cta a {
  min-width: unset !important;
}

Coding Wiz at rebeccagracedesigns.com

📖 Code Encyclopedia for Squarespace: rebeccagracedesigns.com/encyclopedia-of-code

🔥 Free CSS Tutorials: rebeccagracedesigns.com/blog

️ Free Guide to the 41 Most Popular CSS Properties: rebeccagracedesigns.com/popular-css-properties

 

Link to comment
On 6/25/2021 at 12:17 PM, rebeccagracedesigns said:

@DevonHarris

I will make a blog post on this but here is some code that I think will create the effect you are looking for. This code is written for Squarespace 7.1. 

.header-menu {
  width: 60vw;  /*width of the header menu */
}
#page {
  transition: opacity 1s; /* transparency animation */
}
.header--menu-open #page {
  opacity: 30%;  /* makes page transparent when mobile menu is open */
}

.header-menu-nav-folder-content {
  justify-content: flex-start; /* vertical alignment of navigation */
  text-align: left; /* navigation text alignment */
}

.header-menu-cta {
  width: 60vw; /* width of button */
}
.header-menu-cta a {
  min-width: unset !important;
}

worked great, THANK YOU SO MUCH!!!  Can you please post a link to the blog when you write it? 🙂 

Link to comment
  • 3 weeks later...

Coding Wiz at rebeccagracedesigns.com

📖 Code Encyclopedia for Squarespace: rebeccagracedesigns.com/encyclopedia-of-code

🔥 Free CSS Tutorials: rebeccagracedesigns.com/blog

️ Free Guide to the 41 Most Popular CSS Properties: rebeccagracedesigns.com/popular-css-properties

 

Link to comment
  • 2 months later...

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.