Jump to content

Nav menu items unaligned

Go to solution Solved by Beyondspace,

Recommended Posts

Posted
.header-nav-list {
  display: flex; /* Align menu items in a row */
  align-items: center; /* Align items vertically */
  justify-content: space-between; /* Distribute items evenly */
  list-style: none; /* Remove bullets */
  padding: 0;
  margin: 0;
}

.header-nav-item {
  position: relative;
  padding: 10px 20px; /* Adjust spacing */
  text-align: center; /* Center text */
}

.header-nav-item  a {
  text-decoration: none; /* Remove underline */
  color: #333; /* Set text color */
}

.header-nav-item--folder. header-nav-folder-content .header-nav-folder-item {
  display: none; /* Hide submenu by default */
  position: absolute;
  top: 100%; /* Position below the parent menu item */
  left: 0;
  background: #fff; /* Background color for dropdown */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add shadow */
  list-style: none;
  padding: 10px 0;
}

.header-nav-item--folder. header-nav-folder-content:hover .header-nav-folder-item{
  display: block; /* Show submenu on hover */
}

.submenu li {
  padding: 10px 20px; /* Adjust submenu padding */
  text-align: left; /* Align submenu text to the left */
}

.header-nav-folder-item:hover {
  background-color: #f0f0f0; /* Highlight on hover */
}

Add this code into custom css

  • Solution
Posted
6 hours ago, johanhccs said:

Hi,

Up until about a month ago my menu items were all aligned. It seems now any item that has a dropdown menu is not aligned with single menu items. There is some custom CSS for the navigation menu but wondering if something changed with Squarespace itself recently.

https://hudcostreets.org/

Thank you.

 

menu-uneven.png

Looks like the chevron make the dropdown item misalign

image.thumb.png.7368439fa9ed107ac89dd18c9006f1a2.pngI tried

a.header-nav-folder-title {
  display: flex;
}

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> No-code customisations for Squarespace

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.