LightandShapes Posted October 14, 2023 Share Posted October 14, 2023 (edited) Hi, I am setting up my website and added website dividers with the code: Quote // Blue Square Nav Dividers // .header-nav-item a:after { content: "◼"; margin-left: 22px; color: #3195b3; font-size: 15px } div.header-nav-item:last-child>a:after { visibility: hidden; } // Remove Slash From Folder Nav // .header-nav .header-nav-item--folder .header-nav-folder-content .header-nav-folder-item a:after { content: "" !important; } // Remove Active Nav Line // .header-nav-item--active a { background-image: none !important; } I am struggling to get the dividers to display exactly centre. Can anyone help, please? Site: http://trout-finch-fxgz.squarespace.com Password: centrenav Thank you, Edited October 14, 2023 by LightandShapes Missed website link. Link to comment
Vigasan Posted October 14, 2023 Share Posted October 14, 2023 Try something like the following. // Blue Square Nav Dividers // .header-nav-item a:after { content: "◼"; margin-left: 1vw; color: #3195b3; font-size: 15px } div.header-nav-item:last-child>a:after { visibility: hidden; } // Remove Slash From Folder Nav // .header-nav .header-nav-item--folder .header-nav-folder-content .header-nav-folder-item a:after { content: "" !important; } // Remove Active Nav Line // .header-nav-item--active a { background-image: none !important; } .header-layout-branding-center-nav-center .header-title-nav-wrapper .header-nav .header-nav-item{ margin-left: 0px !important; } If an answer I provide helps you, please mark it as the answer so others can easily access it as well. I'm a Squarespace Authorized Trainer, Squarespace Expert, and Circle Member and I've been helping my clients as well as those here in the forum and in various Squarespace groups with custom coding and support for Squarespace websites. I would love to help you in any way I can. Squarespace Plugins | Book Live Help | Squarespace Video Tutorials | Buy Me a Coffee Link to comment
LightandShapes Posted October 15, 2023 Author Share Posted October 15, 2023 17 hours ago, Vigasan said: Try something like the following. // Blue Square Nav Dividers // .header-nav-item a:after { content: "◼"; margin-left: 1vw; color: #3195b3; font-size: 15px } div.header-nav-item:last-child>a:after { visibility: hidden; } // Remove Slash From Folder Nav // .header-nav .header-nav-item--folder .header-nav-folder-content .header-nav-folder-item a:after { content: "" !important; } // Remove Active Nav Line // .header-nav-item--active a { background-image: none !important; } .header-layout-branding-center-nav-center .header-title-nav-wrapper .header-nav .header-nav-item{ margin-left: 0px !important; } Hi, Thank you for your response. This worked perfectly for the first divider, however the following two are still off centre. Are you able to help with this please? Link to comment
tuanphan Posted October 18, 2023 Share Posted October 18, 2023 On 10/16/2023 at 7:28 PM, LightandShapes said: Bump. It looks fine to me 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
Solution LightandShapes Posted October 20, 2023 Author Solution Share Posted October 20, 2023 Yes. I specifically targeted the out of centre divider spacing in the code and nudged them. Here is the code I utilised if anybody comes across this issue desiring a solution: Quote // Blue Square Nav Dividers // .header-nav-item a:after { content: "◼"; margin-left: 0.47vw; color: #3195b3; font-size: 16px } // First Divider Spacing // div.header-nav-item:first-child>a:after { margin-left: 1vw; } // Third Divider Spacing // div.header-nav-item:nth-child(3)>a:after { margin-right: -1.4px; } // Hide Last Divider // div.header-nav-item:last-child>a:after { visibility: hidden; } // Remove Slash From Folder Nav // .header-nav .header-nav-item--folder .header-nav-folder-content .header-nav-folder-item a:after { content: "" !important; } // Remove Active Nav Line // .header-nav-item--active a { background-image: none !important; } // Centre Navigation Dividers // .header-layout-branding-center-nav-center .header-title-nav-wrapper .header-nav .header-nav-item{ margin-left: 0px !important; } 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