Jump to content

Trouble Customizing the Width of Specific Dropdown Menus

Recommended Posts

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

The password is fbla2020

I am not sure of how to customize the width of the specific dropdown menus in the navigation bar (specifically "Portfolio" and "Contact" should be different widths since "Appointments" is a longer word compared to "Beverages.") I am using the Zion template under Photography. Any help with custom CSS would be greatly appreciated!

 

shrink menu.png

shrink less.png

Edited by jaxnoel
Link to comment
34 minutes ago, jaxnoel said:

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

The password is fbla2020

I am not sure of how to customize the width of the specific dropdown menus in the navigation bar (specifically "Portfolio" and "Contact" should be different widths since "Appointments" is a longer word compared to "Beverages.") I am using the Zion template under Photography. Any help with custom CSS would be greatly appreciated!

 

shrink menu.png

shrink less.png

If you want to make the dropdown width auto fit the content

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

If you want to control for each item, feel free to change the value yourself

.header-nav .header-nav-item--folder .header-nav-folder-title[href*="portfolio-1"] + .header-nav-folder-content {
  width: 100px;
}
.header-nav .header-nav-item--folder .header-nav-folder-title[href*="pricing"] + .header-nav-folder-content {
  width: 150px;
}

 

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
10 hours ago, bangank36 said:

If you want to make the dropdown width auto fit the content


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

If you want to control for each item, feel free to change the value yourself


.header-nav .header-nav-item--folder .header-nav-folder-title[href*="portfolio-1"] + .header-nav-folder-content {
  width: 100px;
}
.header-nav .header-nav-item--folder .header-nav-folder-title[href*="pricing"] + .header-nav-folder-content {
  width: 150px;
}

 

It works! Thank you so much

Link to comment
  • 1 month later...
On 12/19/2020 at 12:03 AM, bangank36 said:

If you want to make the dropdown width auto fit the content


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

If you want to control for each item, feel free to change the value yourself


.header-nav .header-nav-item--folder .header-nav-folder-title[href*="portfolio-1"] + .header-nav-folder-content {
  width: 100px;
}
.header-nav .header-nav-item--folder .header-nav-folder-title[href*="pricing"] + .header-nav-folder-content {
  width: 150px;
}

 

Hey! Sorry for the very late question but I think that while I was changing other parts of my site I messed up a part of my code so now this piece of quoted code is ineffective. I'm not sure if it is because of where I put it (relative to the other custom code) or because I deleted a part of the code integral to its function. Again, I am trying to customize the size of the dropdown menu so it fits with the length of the word. Currently, it is much longer than I want it. 

Thank you so much for your help! 

shorten dropdown.png

Link to comment
10 minutes ago, jaxnoel said:

Hey! Sorry for the very late question but I think that while I was changing other parts of my site I messed up a part of my code so now this piece of quoted code is ineffective. I'm not sure if it is because of where I put it (relative to the other custom code) or because I deleted a part of the code integral to its function. Again, I am trying to customize the size of the dropdown menu so it fits with the length of the word. Currently, it is much longer than I want it. 

Thank you so much for your help! 

shorten dropdown.png

Try this

.header-nav .header-nav-item--folder .header-nav-folder-content {
  min-width: inherit;
}

 

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

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.