hannahroj16 Posted July 23, 2023 Author Share Posted July 23, 2023 (edited) 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 July 23, 2023 by hannahroj16 Link to comment
tuanphan Posted July 24, 2023 Share Posted July 24, 2023 What is site url? We can check code 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!) Link to comment
tuanphan Posted July 25, 2023 Share Posted July 25, 2023 For example first dropdown item change this class name .header-nav-folder-content .header-nav-folder-item:nth-child(1)::before to this div.header-nav-item:nth-child(2) .header-nav-folder-item:nth-child(1)::before 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!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment