Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Highlight specific Menu-Item possible?

    Hi everybody,

    I want to highlight a single menu-item in my sidebar when there's a campaign.
    The menu is generated dynamically and this cannot be solved on this level, so I am wondering, if I can select and highlight via CSS by name of the menu-entry ('Membership').

    Any ideas?

    I cannot change the menu generation-code, else I would assign an ID and highlight this via CSS.

    sport field turf

  • #2
    hey
    hey is offline
    New Coder
    Join Date
    Jan 2010
    Posts
    38
    Thanks
    0
    Thanked 13 Times in 13 Posts
    You can use attribute selectors. If you want to highlight Soccer you can do:

    Code:
    [href="field_turf_soccer.html"] {
    color:yellow;
    }
    Unfortunately, the above won't work in older browsers like IE6. You have to resort to using JavaScript for older browsers (in your case).
    Last edited by hey; 04-06-2012 at 05:42 AM.

  • #3
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I cannot change t

    [QUOTE=Buther2;1212754]Hi everybody,

    I want to highlight a single menu-item in my sidebar when there's a campaign.
    The menu is generated dynamically and this cannot be solved on this level, so I am wondering, if I can select and highlight via CSS by name of the menu-entry ('Membership').

    Any ideas?

    I cannot change the menu generation-code, else I would assign an ID and highlight this via CSS.

  • #4
    Regular Coder
    Join Date
    Dec 2010
    Posts
    424
    Thanks
    22
    Thanked 56 Times in 56 Posts
    If the menu item will always be called something like "Membership"
    You can easily do this with css by just adding some css like so

    Code:
    .membership { color:#fff; font-weight:bold; background:#000; }
    All your doing is styling a class that would be added.


  •  

    Posting Permissions

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