orsolya Posted October 17, 2022 Share Posted October 17, 2022 Site URL: https://www.orsolyaoszabo.com/home Hello, Thanks if anyone can help, I managed to add counters to the desktop navigation links, with css. Like photos no. 1 I used this code: .header-nav-list>.header-nav-item:before { content: "0" counter(menu-item-counter) "./"; font-family: proxima-nova; font-style: normal; font-weight: 400; font-size: .625rem; line-height: 1.2em; letter-spacing: .2em; text-transform: uppercase; color: #272724; position: ; top: -10px; left: 65px } .header-nav-list>.header-nav-item { counter-increment: menu-item-counter; position: relative; } .header-nav-list { counter-reset: menu-item-counter; justify-content: flex-start; } And I wanna do the same, on mobile, but I only got 01. before each nav item with almost the same code. (photo no. 2) .header-menu-nav-item a:before { content: "0" counter(menu-item-counter) "./"; font-family: proxima-nova; font-style: normal; font-weight: 400; font-size: .625rem; line-height: 1.2em; letter-spacing: .2em; text-transform: uppercase; color: #272724; position: ; top: -10px; left: 65px } .header-menu-nav-item a { counter-increment: menu-item-counter; position: relative; } .header-menu-nav-item a { counter-reset: menu-item-counter; justify-content: flex-start; } Huge thanks to anyone who can tell me what's wrong, and how to make the nav links actually counting!! Orsi Link to comment
Solution tuanphan Posted October 19, 2022 Solution Share Posted October 19, 2022 Use this code for mobile .header-menu-nav-item:before { content: "0" counter(menu-item-counter) "./"; font-family: proxima-nova; font-style: normal; font-weight: 400; font-size: .625rem; line-height: 1.2em; letter-spacing: .2em; text-transform: uppercase; color: #272724; position: ; top: -10px; left: 65px } .header-menu-nav-item { counter-increment: menu-item-counter; position: relative; } .header-menu-nav-folder[data-folder="root"]>div { counter-reset: menu-item-counter; justify-content: flex-start; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
orsolya Posted October 27, 2022 Author Share Posted October 27, 2022 It works perfectly, thank you so much!! @tuanphan tuanphan 1 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