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

Link to comment
  • Replies 5
  • Views 2.2k
  • Created
  • Last Reply
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;
}

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, 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;
}

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.