nobreferreira Posted September 6, 2013 Share Posted September 6, 2013 Hi all, I thought there was already "first" and "last" classes added to blocktopmenu but they are not there... big fault. Can you anyone help me adding this classes to the menu? Thanks. Link to comment Share on other sites More sharing options...
vekia Posted September 6, 2013 Share Posted September 6, 2013 you can do this with css only: example li:first-child {color:red;} li:last-child {color:blue;} Link to comment Share on other sites More sharing options...
nobreferreira Posted September 6, 2013 Author Share Posted September 6, 2013 Hi Vekia... I know I can do it CSS only. I can do it but regarding some cross browse requirements made by the client I really need to add those classes. Thanks. Link to comment Share on other sites More sharing options...
jennywill Posted June 8, 2014 Share Posted June 8, 2014 I also need help with this. Can anyone describe a code fix for the tpl or php? I realize the style needs to be applied via CSS easy enough, but on my version 1.5.6.2 default theme the target selectors (first-child and last-child) are not defined/applied to the <li> in the code on the first and last menu items. Thus the css doesnt work because the last li does not have the selector assignment. Thanks! Link to comment Share on other sites More sharing options...
vekia Posted June 9, 2014 Share Posted June 9, 2014 (first-child and last-child) are not defined/applied to the <li> you don't have to include them to <li class=""> its because you can define styles for first-child and last-child without class="" definition it will always work . Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now