ashleyev Posted October 20, 2023 Share Posted October 20, 2023 (edited) Hey there! New to Squarespace and CSS. Here's my site: https://aardvark-tangerine-ncep.squarespace.com/config/ I want to customize my header links states to be... Inactive: nothing Hover: underline (or bottom border) Active: underline (or bottom border) Running into 2 problems: The active / hover effect underlines are different. (One came with template and one is my custom CSS, I prefer my customization). When a link is active AND I hover, it has 2 underline decorations. Only want to show one (active) Can someone help me out 😄 Thanks in advance! Screenshot attached. CSS snippet below. /* Apply "DM Sans" to paragraphs and headings */ h1, h2, h3, h4, h5, h6 { font-family: 'DM Sans', sans-serif; font-weight: 500; } /* Apply the custom font style to all Paragraph 1 blocks */ p { font-family: 'Mulish', sans-serif; /* Apply your desired font */ /* Additional styling, such as font size, color, etc. */ } /* Apply a hover effect to the button with the class "your-button-class" */ .your-button-class:hover { background-color: #ff6600; /* Change this to your desired hover background color */ /* Additional styling, such as color, border, etc. */ } /* Apply a custom font style to the header navigation links */ .header-nav-item { font-family:'DM Sans', sans-serif; font-weight: 500; /* Additional styling, such as font size, color, etc. */ } /* Apply an underline effect to the header navigation items on hover */ .header-nav-item:hover { text-decoration: underline; /* Add an underline on hover */ } /* Apply an underline effect to inactive header navigation items on hover */ .header-nav-item:not(.header-nav-item--active):hover { text-decoration: underline; /* Add an underline on hover */ } Edited October 20, 2023 by ashleyev duplicate attachment Link to comment
Web_Solutions Posted October 20, 2023 Share Posted October 20, 2023 56 minutes ago, ashleyev said: Hey there! New to Squarespace and CSS. Here's my site: https://aardvark-tangerine-ncep.squarespace.com/config/ I want to customize my header links states to be... Inactive: nothing Hover: underline (or bottom border) Active: underline (or bottom border) Running into 2 problems: The active / hover effect underlines are different. (One came with template and one is my custom CSS, I prefer my customization). When a link is active AND I hover, it has 2 underline decorations. Only want to show one (active) Can someone help me out 😄 Thanks in advance! Screenshot attached. CSS snippet below. /* Apply "DM Sans" to paragraphs and headings */ h1, h2, h3, h4, h5, h6 { font-family: 'DM Sans', sans-serif; font-weight: 500; } /* Apply the custom font style to all Paragraph 1 blocks */ p { font-family: 'Mulish', sans-serif; /* Apply your desired font */ /* Additional styling, such as font size, color, etc. */ } /* Apply a hover effect to the button with the class "your-button-class" */ .your-button-class:hover { background-color: #ff6600; /* Change this to your desired hover background color */ /* Additional styling, such as color, border, etc. */ } /* Apply a custom font style to the header navigation links */ .header-nav-item { font-family:'DM Sans', sans-serif; font-weight: 500; /* Additional styling, such as font size, color, etc. */ } /* Apply an underline effect to the header navigation items on hover */ .header-nav-item:hover { text-decoration: underline; /* Add an underline on hover */ } /* Apply an underline effect to inactive header navigation items on hover */ .header-nav-item:not(.header-nav-item--active):hover { text-decoration: underline; /* Add an underline on hover */ } Your website is private now. Can you set a password for your site and share it? https://support.squarespace.com/hc/en-us/articles/205815528-Site-wide-passwords?platform=v6&websiteId=63f08707a1ab1979c11e7d14#toc-set-a-site-wide-password tuanphan 1 If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
ashleyev Posted January 11 Author Share Posted January 11 On 10/20/2023 at 3:58 PM, Web_Solutions said: Your website is private now. Can you set a password for your site and share it? https://support.squarespace.com/hc/en-us/articles/205815528-Site-wide-passwords?platform=v6&websiteId=63f08707a1ab1979c11e7d14#toc-set-a-site-wide-password Hello! Yes, the password is limescarf13 I think I may need to upgrade to publish the site. Please let me know if you can't access. I will not take as long to respond this time 🙂 Link to comment
sorca_marian Posted January 11 Share Posted January 11 It says: "SITE DELETED This site has been deleted by the owner." https://aardvark-tangerine-ncep.squarespace.com/ 👨🔧👨💻 Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX 🙋♂️ Squarespace Custom Web Development & Design 📅 Manage Tasks, Take Notes, and Upload Related Images 📹 Squarespace Tutorials for free - YouTube📹 💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years 🙋♂️ Let's connect on LinkedIn Link to comment
ashleyev Posted January 11 Author Share Posted January 11 On 10/20/2023 at 3:58 PM, Web_Solutions said: Your website is private now. Can you set a password for your site and share it? https://support.squarespace.com/hc/en-us/articles/205815528-Site-wide-passwords?platform=v6&websiteId=63f08707a1ab1979c11e7d14#toc-set-a-site-wide-password Here is the new URL for the site: nonagon-swan-prtl.squarespace.com apologies! Link to comment
ashleyev Posted January 12 Author Share Posted January 12 23 hours ago, sorca_marian said: It says: "SITE DELETED This site has been deleted by the owner." https://aardvark-tangerine-ncep.squarespace.com/ Sorry about that. The new site is : nonagon-swan-prtl.squarespace.com Link to comment
sorca_marian Posted January 12 Share Posted January 12 Please provide the password to view it 👨🔧👨💻 Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX 🙋♂️ Squarespace Custom Web Development & Design 📅 Manage Tasks, Take Notes, and Upload Related Images 📹 Squarespace Tutorials for free - YouTube📹 💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years 🙋♂️ Let's connect on LinkedIn Link to comment
tuanphan Posted January 15 Share Posted January 15 On 1/13/2024 at 5:21 AM, sorca_marian said: Please provide the password to view it password is limescarf13 sorca_marian 1 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
sorca_marian Posted January 16 Share Posted January 16 I just checked it and it works like you wanted it. Maybe you found a solution 👨🔧👨💻 Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX 🙋♂️ Squarespace Custom Web Development & Design 📅 Manage Tasks, Take Notes, and Upload Related Images 📹 Squarespace Tutorials for free - YouTube📹 💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years 🙋♂️ Let's connect on LinkedIn Link to comment
ashleyev Posted January 16 Author Share Posted January 16 5 hours ago, sorca_marian said: I just checked it and it works like you wanted it. Maybe you found a solution Hi Sorca, Thanks for checking it, but I see the same issue. When I click on a link in the header and it's in active state, when I hover over the active link a second underline appears. See screenshot. Link to comment
sorca_marian Posted January 17 Share Posted January 17 Add the below code in Custom CSS .header-nav-item:hover { text-decoration: none; } 👨🔧👨💻 Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX 🙋♂️ Squarespace Custom Web Development & Design 📅 Manage Tasks, Take Notes, and Upload Related Images 📹 Squarespace Tutorials for free - YouTube📹 💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years 🙋♂️ Let's connect on LinkedIn Link to comment
ashleyev Posted January 17 Author Share Posted January 17 6 hours ago, sorca_marian said: Add the below code in Custom CSS .header-nav-item:hover { text-decoration: none; } Thank you! That worked, but if you notice in my screenshot, the hover line and the active link line have different spacing beneath the link. Is there a way to make this uniform? (Commissions vs. Classes) Link to comment
sorca_marian Posted January 18 Share Posted January 18 Yes, in addition to the above code, add the below one as well in Custom CSS .header-nav-item:not(.header-nav-item--active):hover { text-decoration : none; } .header-nav-item:not(.header-nav-item--active):hover a { background-image: linear-gradient(currentColor,currentColor); background-repeat: repeat-x; background-size: 1px 1px; background-position: 0 100%; background-position: 0 calc(100% - 0.1em); } ashleyev 1 👨🔧👨💻 Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX 🙋♂️ Squarespace Custom Web Development & Design 📅 Manage Tasks, Take Notes, and Upload Related Images 📹 Squarespace Tutorials for free - YouTube📹 💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years 🙋♂️ Let's connect on LinkedIn Link to comment
Solution ashleyev Posted January 18 Author Solution Share Posted January 18 6 hours ago, sorca_marian said: Yes, in addition to the above code, add the below one as well in Custom CSS .header-nav-item:not(.header-nav-item--active):hover { text-decoration : none; } .header-nav-item:not(.header-nav-item--active):hover a { background-image: linear-gradient(currentColor,currentColor); background-repeat: repeat-x; background-size: 1px 1px; background-position: 0 100%; background-position: 0 calc(100% - 0.1em); } That worked! Thank you! sorca_marian 1 Link to comment
sorca_marian Posted January 19 Share Posted January 19 Please mark my above post as the solution 👨🔧👨💻 Contact me for development and design work - Freelancer Software engineer, Architect, and Designer UI/UX 🙋♂️ Squarespace Custom Web Development & Design 📅 Manage Tasks, Take Notes, and Upload Related Images 📹 Squarespace Tutorials for free - YouTube📹 💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years 🙋♂️ Let's connect on LinkedIn 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