Jump to content

Changing Width of Nav Dropdown Menu

Go to solution Solved by Ziggy,

Recommended Posts

Posted

Hello,

My client wants the nav dropdown menus to be smaller in width so you don't have to scroll across the page to view the entire titles of the services. I found the following code but when used, it only changed the width of the box and not the text (see screenshot attached). Any way I can make the text go to the next line with the new width?

Here is the code that made the box smaller:

.header-nav .header-nav-item--folder .header-nav-folder-content {
    width: 100px;
}

 

Screenshot 2024-05-10 at 10.42.45 AM.png

  • Solution
Posted

Try this Custom CSS:

.header-nav .header-nav-item--folder .header-nav-folder-content {
  min-width:unset;  
  width: 120px !important;
}
.header-nav .header-nav-item--folder .header-nav-folder-content .header-nav-folder-item {
  white-space: initial;
}

 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

That worked! I played around with the width of it. 

I am worried that my client will complain about the words being under the "bullet" which is just a symbol I put in front of each nav title. They are very picky. Is there a way I can indent the words "therapy" a bit to align with the first word? Screenshot attached. 

Screenshot 2024-05-10 at 12.49.24 PM.png

Posted (edited)
19 minutes ago, slyfoxcreative said:

I am worried that my client will complain about the words being under the "bullet" which is just a symbol I put in front of each nav title. They are very picky. Is there a way I can indent the words "therapy" a bit to align with the first word? Screenshot attached. 

You would have to put the bullet in as a pseudo element before the text using ::before {content:"";} on the navigation items in the folder.

Would you mark my post as the solution and give it a thumbs up if it helped? Thanks!

Edited by Ziggy

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

Try this:

.header-nav-folder-item:before {content:"dot";} 

Thanks for the like!

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

Try this:

.header-nav-folder-item a:before {content:"dot";} 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

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.