michielbles Posted November 24, 2014 Share Posted November 24, 2014 Hi everyone, In another topic I found a way to change the background color of a single item in the drop down menu (I use a custom theme, check www.kamer-stukken.com) To change the CSS of your specific link, open up superfish-modified.css and add: .sf-menu > li li :nth-child(3) a{color:#FF0000;} However, this changes the color of all items ranked third. What I want, is to change the color of ONE item in ONE column, so only ONE item in the whole topmenu. Looking forward to the solution for this issue. Best, Michiel Link to comment Share on other sites More sharing options...
FullCircles Posted November 25, 2014 Share Posted November 25, 2014 (edited) I'm a little unclear which level of menu you're trying to affect, if it's the top level, try just: .sf-menu > li:nth-child(3) a{color:#FF0000;} If it's indeed a specific one inside one of the top level menus.. then it should be possible to do: .sf-menu > li:nth-child(2) > ul > li:nth-child(3) a{color:#FF0000;} Where you would need to change the (2) to be whichever column the link is in However, if this is for a single link, it's getting a little fiddly, plus, if your category order ever changes, the coloured link will be wrong.. so it might be worth instead altering the template which provides those categories and adding a class to the li tags. Can't tell from the code what that template file might be unfortunately, the one we use is the blockcategories module, might be different with this theme however. In there though, you should be able to find the <li> tag, and you'll just need to change it like this: <li class="navcat-{$node.id}"> At which point you'll have a class which you can use to target and recolour any specific link based on its id, which won't get lost when the nav gets re-ordered, just use: .navcat-9 a {color:#FF0000;} Hope that made sense, hard to explain in detail without knowing for sure what the template code is like - Just had a check and altered code to match the block categories a little more.. but your theme is different from that by the looks, so if you want to find what template you use and post it here, I can give the actual changes needed Edited November 25, 2014 by FullCircles (see edit history) 1 Link to comment Share on other sites More sharing options...
michielbles Posted November 25, 2014 Author Share Posted November 25, 2014 Excellent FullCircles, that works great. Thanks very much. Link to comment Share on other sites More sharing options...
EDAPO Posted October 17, 2015 Share Posted October 17, 2015 Thanks, it helped me a lot. 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