Jeremy2338 Posted October 17, 2023 Share Posted October 17, 2023 Hi everyone Website: https://www.shopfragrant.com/ When I hover on one of the header buttons, others start to move to the sides. Is there a CSS command to prevent them from moving? Link to comment
Ziggy Posted October 17, 2023 Share Posted October 17, 2023 The navigation link are moving because the text gets wider because of the bolding on hover. You could add a minimum width to the nav links, but that probably would probably have a negative impact on the spacing. Removing the bold hover would stop them moving too. Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
Jeremy2338 Posted October 17, 2023 Author Share Posted October 17, 2023 (edited) You are right it's because of the bolding on hover, that's the effect I wanted to achieve. Can you suggest a CSS command that would add a minimum width to the nav links? I would try and see if it works Edited October 17, 2023 by Jeremy2338 Link to comment
Ziggy Posted October 17, 2023 Share Posted October 17, 2023 You can try this Custom CSS: .header-layout-branding-center-nav-center .header-title-nav-wrapper .header-nav .header-nav-item { min-width: 10em; } Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
Jeremy2338 Posted October 17, 2023 Author Share Posted October 17, 2023 (edited) Isn't there a command that would "glue" nav links to the header? Thanks for the CSS, however it's not working. Elements that are next to the hovered one still move Edited October 17, 2023 by Jeremy2338 Link to comment
tuanphan Posted October 19, 2023 Share Posted October 19, 2023 On 10/17/2023 at 8:21 PM, Jeremy2338 said: Isn't there a command that would "glue" nav links to the header? Thanks for the CSS, however it's not working. Elements that are next to the hovered one still move Use this new code .header-nav .header-nav-item { min-width: 10em; overflow: hidden; max-width: 150px; } .header-nav .header-nav-item a { display: inline-block; } 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 October 26, 2023 Share Posted October 26, 2023 On 10/23/2023 at 2:38 AM, Jeremy2338 said: @tuanphan What is problem? 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
Jeremy2338 Posted October 26, 2023 Author Share Posted October 26, 2023 @tuanphan elements are way too far from each other Link to comment
tuanphan Posted October 29, 2023 Share Posted October 29, 2023 On 10/27/2023 at 2:20 AM, Jeremy2338 said: @tuanphan elements are way too far from each other You can adjust this number 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
Jeremy2338 Posted October 30, 2023 Author Share Posted October 30, 2023 On 10/29/2023 at 3:51 AM, tuanphan said: You can adjust this number 1 - 2em width looks fine, however the elements that are next to the hovered one still move Link to comment
Ziggy Posted October 30, 2023 Share Posted October 30, 2023 9 minutes ago, Jeremy2338 said: 1 - 2em width looks fine, however the elements that are next to the hovered one still move The purpose of the 10em was to exceed the width of the header navigation links so they don't move on hover/bold, if you set it to 2em it will do nothing which is why you still get the shifting. You can either set the width as suggested and have wider than ideal spacing not getting the shift on hover, or you can have better spacing and live with the shifting on hover, alternatively you can change the hover style. Sadly there's not much else to be done with this. Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? 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