Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Hos do I assign a different class to ONE menu item? 
 
lindaw
Sr. Member
 
Total Posts:  201
Joined:  2007-12-25
 

Hi all,

My navigation items are all the same colour but I would like to assign one of the items a different colour. Does anyone know how I would do this?

Thanks a lot,
Linda

 
Magento Community Magento Community
Magento Community
Magento Community
 
Macaper
Member
 
Total Posts:  48
Joined:  2008-09-02
 

I have posted alot lately my self, so decided to display all unanswered posts and try to answer as many as possible and found your post smile

Can you please give more information on what you want to do.
Are we talking about for example color the active menu choice or anything like that?

Cause if that is the case I would recommend to handle this entirerly by CSS as that requires less programming logic and that also makes it easier with future updates etc.
I usually allways build my entire menu functions purely on CSS

But maby I missunderstood what you wanted to intially do so just give me more information and I will try my best to answer your question

 
Magento Community Magento Community
Magento Community
Magento Community
 
Voot
Sr. Member
 
Total Posts:  261
Joined:  2008-03-20
Long Beach, CA
 

Hi, it is very possible to achieve this. Once you create a category, in the frontend highlight the categories and view the source. You’ll notice that Magento automatically creates a class for each category name. Simply add that class to the boxes.css file and edit to your liking. I hope I made sense, if not give me the link to your website and I can show you how to do it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Murat_TR
Jr. Member
 
Total Posts:  11
Joined:  2007-10-30
 

Hi

Here is the HTML code

<li class="level0 nav-despre-neykids">
<
a href="http://www.neykids.com/despre-neykids"><span>Despre Neykids</span></a>
</
li>

And here is what i implemented on my boxes.css

.level0 .nav-despre-neykids a {color:green;}

But nothing is changed

my link is http://www.neykids.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
Voot
Sr. Member
 
Total Posts:  261
Joined:  2008-03-20
Long Beach, CA
 

Try adding this to the menu.css (My bad, not the boxes.css)

#nav .nav-despre-neykids a { color:green; }
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top