jackgoh Posted March 14, 2014 Share Posted March 14, 2014 (edited) Does any know how to set every ul with different CSS like this ? Please help http://postimg.org/image/fnb2bzl67/ Edited March 14, 2014 by jackgoh (see edit history) Link to comment Share on other sites More sharing options...
dioniz Posted March 14, 2014 Share Posted March 14, 2014 You can do it with first-child and nth-child selectors but works from IE9 only Link to comment Share on other sites More sharing options...
jackgoh Posted March 14, 2014 Author Share Posted March 14, 2014 (edited) I just solved myself by adding label to my <li> in blocktopmenu.php $this->_menu .= '<li class="'.$link[0]['label'].'"> line 665 and now I can change it with different CSS Edited March 14, 2014 by jackgoh (see edit history) Link to comment Share on other sites More sharing options...
dioniz Posted March 14, 2014 Share Posted March 14, 2014 Good idea, thanks for sharing Link to comment Share on other sites More sharing options...
vekia Posted March 14, 2014 Share Posted March 14, 2014 first child and last child allows to change only first and last element. $this->_menu .= '<li class="'.$link[0]['label'].'"> line 665 and now I can change it with different CSS you changed it for each CASE value in switch function? Link to comment Share on other sites More sharing options...
jackgoh Posted March 14, 2014 Author Share Posted March 14, 2014 first child and last child allows to change only first and last element. you changed it for each CASE value in switch function? Nope, because my menu just have link and category so I just changed LNK in switch function. Category menu tab just edit the default CSS Link to comment Share on other sites More sharing options...
vekia Posted March 14, 2014 Share Posted March 14, 2014 ok everything is clear for everyone interested in this solution if you use also other "links" like cms, categories - you have to modify also other "CASES" from switch function. how? in the same way as for LNK thank you! 1 Link to comment Share on other sites More sharing options...
dioniz Posted March 14, 2014 Share Posted March 14, 2014 first child and last child allows to change only first and last element. Yeah , but i said first-child and nth-child which can be used to style every link differently 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