Jump to content

Dropdown Menu Alignment is off

Recommended Posts

Posted

I am working on a site and I am having trouble having the dropdown menu align correctly when it opens. I was told if my navigation bar is adjusted to the right, this is what happens. I have changed the navigation bar position, such as to the left or center, and the dropdown menu works fine, but if adjusted to the right, it does not. Is there a code that I could use to correct this? Thank you!

Screen Shot 2020-08-28 at 11.01.42 PM.png

Posted (edited)

This is the code I used to align the drop down menu text on my site, align the nav bar the way you need it to be then add the code to custom css, you can change it to right or center if you wish. 

#topNav .main-nav .folder-, 

collection .subnav ul { text-align:

left;
 }
 

My Random Views

Edited by derricksrandomviews
Posted
7 hours ago, derricksrandomviews said:

Give it a try again my copy to the post may have changed something, and that includes spaces. 

#topNav .main-nav .folder-collection .subnav ul { text-align: left;
 }

I think above site is 7.1, your code for 7.0

 

16 hours ago, blix said:

It didn't work for me....

Incorrect password.

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!)

Posted

Thank you so much. It's finally working correctly. I appreciate everyone's help in resolving this glitch! 

Jeanette

 

Posted

Hello, my navigation dropdown is perfect however one small request. My blue box is a little high and almost touching the text navigation. Could you tell me what I can insert in this code to drop it a little?

/* Center dropdown */
.header-nav-folder-content {
  left: 50% !important;
  transform: translateX(-50%);
  text-align: center!important;
  width: 90px!important;
}
 

Thank you so much, Jeanette (7.1)

IMG_2449 copy.jpg

  • 2 years later...
Posted

Old thread....but follow up question:

That code worked to align one navigation dropdown menu, but not the second. How do I assign them different alignments? I want both dropdown menus to be under the "Shop+" category

image.thumb.png.e973a9f3698d1d21b96ebbbb30f6c3e4.pngimage.thumb.png.71666cc4f6c2a56aebfcbc28343b11a8.png 

Posted
22 hours ago, hartley said:

Old thread....but follow up question:

That code worked to align one navigation dropdown menu, but not the second. How do I assign them different alignments? I want both dropdown menus to be under the "Shop+" category

image.thumb.png.e973a9f3698d1d21b96ebbbb30f6c3e4.pngimage.thumb.png.71666cc4f6c2a56aebfcbc28343b11a8.png 

Hi. What is your site url? We can check easier

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!)

Posted (edited)

@tuanphanURL is https://www.heroncabinetry.com/

Im okay with the drop down menu coming from the left for both navigation titles, but i was hoping to move it slightly to the right so the green edge from the dropdown menu matches the black left edge of the "Shop" button. I also want to move the drop down menu down a tiny bit so it hits the bottom edge of the "Shop" button. Shown in the example, I've also included my custom CSS for the header:

image.png.97a4f4dbae0c2e090691c66627a78f2d.png  image.thumb.png.d1794a6e36cb424aeaf16f759051ceba.png

Edited by hartley
Posted
6 hours ago, hartley said:

@tuanphanURL is https://www.heroncabinetry.com/

Im okay with the drop down menu coming from the left for both navigation titles, but i was hoping to move it slightly to the right so the green edge from the dropdown menu matches the black left edge of the "Shop" button. I also want to move the drop down menu down a tiny bit so it hits the bottom edge of the "Shop" button. Shown in the example, I've also included my custom CSS for the header:

image.png.97a4f4dbae0c2e090691c66627a78f2d.png  image.thumb.png.d1794a6e36cb424aeaf16f759051ceba.png

Don't remove any code in your current code. Add this to Design > Custom CSS

.header-nav-item.header-nav-item--folder {
    position: relative !important;
}
.header-nav-folder-content {
    left: 0 !important;
}

 

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!)

Posted
3 hours ago, hartley said:

@tuanphanthat worked perfectly! thank you! Now do you know how I would lower the dropdown menu box so it doesn't cover any of the black "Shop" button?

Add margin-top

.header-nav-folder-content {
    left: 0 !important;
    margin-top: 10px;
}

 

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!)

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.