dakota_spring Posted August 17, 2014 Share Posted August 17, 2014 Hello everybody, i've been wondering if it's possible to change the color of only ONE tab of the top horizontal menu? I have those different tabs e.g. Home, Products1, Products2... And a Sale tab as well, which I would like to have marked red to make it more visible. Is it possible to change only that part/tab of the top horizontal menu without affecting the color of the whole menu? I'm using Prestashop 1.5.4.1. Thanks in advance! Link to comment Share on other sites More sharing options...
vekia Posted August 17, 2014 Share Posted August 17, 2014 in default prestashop 1.5.4.1 top menu module it's not possible. only with some hacks / css styles (css solution allows to add different style for last and first menu item) Link to comment Share on other sites More sharing options...
dakota_spring Posted August 17, 2014 Author Share Posted August 17, 2014 could you give me an example of how it could look like? Link to comment Share on other sites More sharing options...
vekia Posted August 18, 2014 Share Posted August 18, 2014 but what? jquery code to define unique id/class for each menu element? or css for first and last element change? Link to comment Share on other sites More sharing options...
dakota_spring Posted August 22, 2014 Author Share Posted August 22, 2014 I guess it would be better for me to be able to define each menu element so I pick the jquery code. Link to comment Share on other sites More sharing options...
PascalVG Posted August 23, 2014 Share Posted August 23, 2014 Hi Dakota, try this: in file: /modules/blocktopmenu/css/superfish-modified.css (make backup!): add somewhere: .sf-menu li:nth-child(4) { background-color: #a72;}.sf-menu li:nth-child(4) a:hover { background-color: #472;} Where 4 should be replaced with the tab number in your menu (i.e. if third tab, add 3 etc) The colour of the menu item can be changed by changing the #a72 (color for 'normal' menu item) and #472 (colour when hovering over the item) Hope this helps, pascal Link to comment Share on other sites More sharing options...
dakota_spring Posted August 23, 2014 Author Share Posted August 23, 2014 Great! That worked But there seems to be a little problem... I chose it to be nr. 6 and now on every other menu the 6th element has that different color too... Link to comment Share on other sites More sharing options...
PascalVG Posted August 23, 2014 Share Posted August 23, 2014 Hi Dakota, Do you have a link to your site, so I can see it? Link to comment Share on other sites More sharing options...
vekia Posted August 23, 2014 Share Posted August 23, 2014 use code with "<" then onli first level items will be with background color .sf-menu > li:nth-child(2) { background-color: #a72; } note that nth-child selector is not supported by all browsers, this is why i think jquery will be better, but more complicated solution Link to comment Share on other sites More sharing options...
dakota_spring Posted September 1, 2014 Author Share Posted September 1, 2014 I don't get, where exactly should I put "<"? Link to comment Share on other sites More sharing options...
PascalVG Posted September 2, 2014 Share Posted September 2, 2014 Hi Dakota, I think Vekia meant '>', not '<', like he a actually used in his example code... Link to comment Share on other sites More sharing options...
dakota_spring Posted September 7, 2014 Author Share Posted September 7, 2014 Finally got it, thank you all! Link to comment Share on other sites More sharing options...
PascalVG Posted September 8, 2014 Share Posted September 8, 2014 Good to hear! I'll mark the topic as solved. Happy selling, pascal. Link to comment Share on other sites More sharing options...
bogdy06 Posted May 6, 2015 Share Posted May 6, 2015 Perfect! Thanks Dakota for the question, and Pascal and Prestashop Legend for the answers. 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