Jump to content

HOW CAN I FIX MY DROP DOWN MENU ICONS, THE ICON I INSERT IN THE FIRST SECTION KEEPS APPEARING ON THE SECOND ONE

Recommended Posts

  • Replies 3
  • Views 613
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

the code I'm using
 

Quote

 

* For the blur effect and rounded edges */
.header-nav-folder-content {
  position: relative;
  background-color: rgba(0, 0, 0, 0.4); /* Black with 40% opacity */
  border-radius: 10px; /* Adjust the border-radius to get rounder edges */
  padding: 10px; /* Add padding to create some space around the content */
}

/* For the pseudo-element with blurred background */
.header-nav-folder-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* Black with 40% opacity */
  filter: blur(5px); /* Adjust the blur amount as per your preference */
  z-index: -1; /* Place it behind the content */
  border-radius: inherit; /* Inherit the same border-radius as the parent */
}

/* For the line separator under the title */
.header-nav-folder-title:after,
.header-nav-folder-content .header-nav-folder-item a:after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  background: #fff; /* color of line */
  position: absolute;
  bottom: 0;
  left: 0;
  transition: width 0.3s;
}

/* For the dropdown items */
.header-nav-folder-content .header-nav-folder-item a {
  display: inline-block;
  position: relative;
  padding: 8px 20px; /* Add padding to increase the spacing between menu items */
}

/* For the line separator on hover */
.header-nav-item:hover .header-nav-folder-title:after,
.header-nav-folder-content .header-nav-folder-item a:hover:after {
  width: 100%;
}

/* For positioning and centering the dropdown content */
a.header-nav-folder-title:hover + div,
.header-nav-folder-content {
  text-align: center !important;
  position: absolute;
  left: 50% !important;
  right: unset !important;
  transform: translateX(-50%);
  background: transparent !important;
}

/* For the icon beside the "About interlink 3" dropdown menu */
.header-nav-folder-content .header-nav-folder-item {
  position: relative;
  padding-left: 25px; /* Add padding to the left to make space for the icon */
}

/* Icon for the "About interlink 3" dropdown menu */
.header-nav-folder-content .header-nav-folder-item::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 20px; /* Set the width of the icon */
  height: 20px; /* Set the height of the icon */
  background-size: cover; /* Adjust the background-size property as per your icon */
  background-repeat: no-repeat;
  background-position: center;
  transform: translateY(-50%);
}

/* Icon for the first dropdown menu */
.header-nav-folder-content .header-nav-folder-item:nth-child(1)::before {
  background-image: url('https://static1.squarespace.com/static/64b9d8eb5fe45c5283e144a2/t/64bcc555b5f8dc6b637d78a8/1690092885769/Untitled+%28750+%C3%97+512px%29+%2850+%C3%97+50px%29+%281%29.png'); /* URL of the first icon */
}

/* Icon for the second dropdown menu */
.header-nav-folder-content .header-nav-folder-item:nth-child(2)::before {
  background-image: url('https://static1.squarespace.com/static/64b9d8eb5fe45c5283e144a2/t/64bcc8bd84f42429650036bd/1690093757846/Untitled+%28750+%C3%97+512px%29+%2850+%C3%97+50px%29+%282%29.png'); /* URL of the second icon */
}

/* Icon for the third dropdown menu */
.header-nav-folder-content .header-nav-folder-item:nth-child(3)::before {
  background-image: url(https://static1.squarespace.com/static/64b9d8eb5fe45c5283e144a2/t/64bccb4d03afcb331e291f01/1690094413360/Untitled+%28750+%C3%97+512px%29+%2850+%C3%97+50px%29+%283%29.png); /* Replace 'URL_OF_THIRD_ICON' with the URL of the third icon */
  /* Add additional styling for the third icon if needed */
}

 

 

Edited by hannahroj16
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.