Jump to content

Recommended Posts

I have the module [top horizontal menu 1.3v] which main css is superfish-modified.css.

 

I am looking towards modifing one menu item, but I have not had success finding the page code to add the style or class to that piece of text, any help?

 

I am trying to modify the 'sale' item to red color.

 

webpage is: www.laguarda.cl

Link to comment
Share on other sites

To change the text colour of the menu items, adjust the color property in:

.sf-menu a {

display:block;

position:relative;

color:#000;

}

 

By editing the CSS alone, you cannot make only the sale item a different colour from the rest.

Link to comment
Share on other sites

To change the CSS of your specific link, open up superfish-modified.css and add:

 

.sf-menu > li:nth-child(3) a{color:#FF0000;}

 

to change the style on hover:

 

.sf-menu > li:nth-child(3) a:hover{your css here;}

 

where (3) is the third link of the menu, you can change this to match a specific link.

 

This won't make any change though on some older browsers. IE 6,7,8.

Edited by Wynn (see edit history)
  • Like 3
Link to comment
Share on other sites

  • 3 months later...

you must edit blocktopmenu module blocktopmenu.php file.

 

you need to add some changes to $this->_menu variable

 

for example:

if ($this->page_name=='cms'){
$newclass="mynewclass";
}
$this->_menu .= '<li '.$selected.' class="'.$newclass.'">';
$this->_menu .= '<a href="'.$links[0]['link'].'">'.$cms->meta_title.'</a>';
$this->_menu .= '</li>';

Edited by vekia (see edit history)
Link to comment
Share on other sites

you must edit blocktopmenu module blocktopmenu.php file.

 

you need to add some changes to $this->_menu variable

 

for example:

if ($this->page_name=='cms'){
$newclass="mynewclass";
}
$this->_menu .= '<li '.$selected.' class="'.$newclass.'">';
$this->_menu .= '<a href="'.$links[0]['link'].'">'.$cms->meta_title.'</a>';
$this->_menu .= '</li>';

 

I just wanted to add an ID to each item -> class="'.$id.'" .

final : $this->_menu .= '<li class="'.$id.'" '.$selected.'>

 

It's a simple solution. something like this should be in the core. Does the job for me now and hope can help anyone out there. cheers vekia

Link to comment
Share on other sites

  • 1 year later...

Hello! 

 

I know this topic is quite dead. But when I go and try this solution from post above - I see no changes at blockmenutop menu. When I look at the source after update - there is just <li> 

 

I would like also mention that I've did add classes to all $this->_menu .= '<li'.$selected.'> so all looks like: $this->_menu .= '<li class="'.$id.'" '.$selected.'>

 

W/o any change. Can some one help me with that topic? I using latest presta 1.5.6

Link to comment
Share on other sites

  • 1 year later...

you must edit blocktopmenu module blocktopmenu.php file.

 

you need to add some changes to $this->_menu variable

 

for example:

if ($this->page_name=='cms'){
 $newclass="mynewclass";
}
$this->_menu .= '<li '.$selected.' class="'.$newclass.'">';
$this->_menu .= '<a href="'.$links[0]['link'].'">'.$cms->meta_title.'</a>';
$this->_menu .= '</li>';

 

 

I just wanted to add an ID to each item -> class="'.$id.'" .

final : $this->_menu .= '<li class="'.$id.'" '.$selected.'>

 

It's a simple solution. something like this should be in the core. Does the job for me now and hope can help anyone out there. cheers vekia

 

 

 

Hello, works on PS 1.6? I dont find nothing similar like that.

 

I want a different ID for each category 

Link to comment
Share on other sites

  • 2 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...