fbpx

Trick or Treat - 30% OFF - Coupon Code: SCARY20 Grab the Deal!

Welcome, Guest
Username: Password: Remember me

TOPIC: css class won't work in menu items if menu is in a mod pos.

css class won't work in menu items if menu is in a mod pos. 4 months 3 weeks ago #22892

  • james03
  • james03's Avatar
  • Offline
  • New Member
  • Posts: 2
  • Karma: 0
Hi,
I'm working on an offline website using Astroid Framework (2.3.0) and template zero.
When I try to style a secondary menu in position-1 with a css link class (in my case btn btn-outline-primary) it take effect only if menu item is an alias and absolutely not in case of a normal menu link.

Thanks in advance for any help
The administrator has disabled public write access.

css class won't work in menu items if menu is in a mod pos. 4 months 3 weeks ago #22899

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4153
  • Thank you received: 609
  • Karma: 108
Hi,

Can you check and the HTML and make sure the class is being added with a space before. Sometimes it's just as simple as adding a space before/after the class menu in the menu item level.

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

css class won't work in menu items if menu is in a mod pos. 4 months 3 weeks ago #22910

  • james03
  • james03's Avatar
  • Offline
  • New Member
  • Posts: 2
  • Karma: 0
Thank you for your reply.
I've tryed with a space before and/or after the class but the result is the same (I've analyzed html output and no class is showed before the link).
It seems that the style applies only if the menu item is a system item like alias or separataor title... but not for any other item type like single article or blog.

If it could help I'm working with Joomla 3.9.19 and php 7.2
The administrator has disabled public write access.

css class won't work in menu items if menu is in a mod pos. 4 months 2 weeks ago #22926

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4153
  • Thank you received: 609
  • Karma: 108
Hi,
I am unable to re-produce this and I don't think this is an issue.

Here is what I added.
1. Added the class to a menu item.
2. Published the module mod_menu to hero position (which shouldn't matter if you published to position-2).




You are probably doing something wrong.

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.
Moderators: chandandeep
Time to create page: 0.301 seconds