SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2012
    0 Post(s)
    0 Thread(s)

    Required to set background color for menu

    Hi friends,

    i had created a site in joomla, with 5 menus and two submenu for two parent menu. My main menus are listed below


    2.About us

    2.1 Home
    2.2 Advantages
    2.3 Brief

    3. Services

    3.1 Home
    3.2 Sample

    4. Careers

    . I want to set active menu item background-color as blue. So for this my syntax is #menu ul a { background-color:blue; }

    But unfortunately it is applicable for home menu only. When i clickmenu (active id="current") it available only for home. Remaining menus doesn't contain id="current" where relevant select. So any body clarify this.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Melbourne, AU
    460 Post(s)
    8 Thread(s)
    Hi joomlaforums. Welcome to the SitePoint forums.

    You can do this with CSS, or JavaScript, or PHP, as discussed here:

    However, Joomla probably has some inbuilt functions for this, so I'd check that out too. for example, other CMSes can look at the current URL and ass in the "current" class/ID if the URL of the page matches the URL in the link. So I'd check that out first. (I don't know Joomla.)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts