slotrios Posted May 8, 2015 Share Posted May 8, 2015 I have hidden product subcategories in the top menu of my 1.6 prestashop by adding to the global.css this: #block_top_menu ul li li ul {display:none!important;} I achieved what I wanted, hide the products subcategories, but now even CMS subcategories are hidden. How can I avoid that? Thanks a lot!! Link to comment Share on other sites More sharing options...
PascalVG Posted May 9, 2015 Share Posted May 9, 2015 You could use nth-child, like this for example: If your Categories are the first 5 elements in the main menu, and after that you have the cms pages, you could use: #block_top_menu ul li:nth-child(-n+5) li ul { display: none!important; } You could also make other combinations to select all main items, if they are mingled with the cms or so. Then just add a second path to the css code, like: #block_top_menu ul li:nth-child(-n+3) li ul, #block_top_menu ul li:nth-child(5) li ul { display: none!important; } to select the first three and the fifth main item only. Be creative :-) More example on how to use nth-child for example here: http://www.paulund.co.uk/how-to-use-css-nth-child Hope this helps, pascal. 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