Tuesday, May 15, 2012

Joomla! 2.5 Menu Manager: Link CSS Style

To assign a custom CSS class to a Joomla menu link
  1. From the Joomla Admin menu, select Menus > Main Menu (or whatever menu you want to edit).
  2. Click the menu link to which you want to assign a custom CSS class.
  3. From the menu options on the right side of the page, click Link Type Options.

    Joomla Menu Item Custom Class Configuration
  4. In the Link CSS Style field, enter a CSS class name

    IMPORTANT: Use only alpha numerical characters, hyphens, and underscores, but no spaces.
  5. Click Save & Close to save your changes.

    Joomla adds the custom class to the menu link.

    Custom CSS Class in Joomla Menu Link
  6. Now you can use a CSS class to create custom formatting for the link you modified. For example, create a CSS class in your css stylesheet; make sure to use the exact same class name you used in the link:
    a.homestyle {color:#fff;font-size:11px;background:#666}

2 comments:

  1. But where i write CSS class?
    in which file?

    ReplyDelete
  2. @Nofak We often write css in the file templates/the_template_name/css/template.css

    ReplyDelete

Subscribe to RSS Feed Follow me on Twitter!