Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: How to make a tab appear "selected"

  1. #1
    Join Date
    Nov 2008
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to make a tab appear "selected"

    I am using the Glossy Horizontal Menu http://www.dynamicdrive.com/style/cs...rizontal_menu/ on a site and it's working great except that I can't seem to get the selected tab to appear highlighted or standing out.

    The menu is located in a dot net master page, so it is located in one place. The style is not loaded with each page in an inline fashion.

    Is there a way to do this? Do I have to change my technique?

    TIA...

  2. #2
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    A link to the site or code would be appreciated to better understand the problem.

  3. #3
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Give the tab you want to be selected a "current" class:
    Code:
    <li class="current"><a href="http://www.dynamicdrive.com/"><b>Home</b></a></li>

  4. #4
    Join Date
    Nov 2008
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Snookerman View Post
    Give the tab you want to be selected a "current" class:
    Code:
    <li class="current"><a href="http://www.dynamicdrive.com/"><b>Home</b></a></li>
    Thanks Snookerman...

    But this class assignment would have to be made in the menuing system which is loaded by the master page.

    Or would this work if I place this code in the page that I want the tab to appear as selected and would work due to the cascading nature of CSS?

    Thanks again...

  5. #5
    Join Date
    Nov 2008
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I tried what Snookerman suggested by putting the code in a page. All that happened was that a new menubar appeared below the one generated by the master page.

    There's got to be a way to do this. Can someone please help with this?

    TIA...

  6. #6
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Hmm.. could you please post a link to your site?

  7. #7
    Join Date
    Nov 2008
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes. It's http://www.ramsayrealty.com/new_web/ and is no where near ready for prime time.

  8. #8
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Have you tried this:
    Code:
    <li class="current" id="home"><a href="http://www.ramsayrealty.com/new_web/default.aspx"><b>Home</b></a></li>

  9. #9
    Join Date
    Nov 2008
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Snookerman View Post
    Have you tried this:
    Code:
    <li class="current" id="home"><a href="http://www.ramsayrealty.com/new_web/default.aspx"><b>Home</b></a></li>
    Yes. When I tried it in the specific page, it gave me one clickable link.

    I can't apply it in the master page because that's the one place where the menus exist, and each page is rendered from that one master page.

    I need the "current" class to be applied to the current page when it is loaded.

    In reading some other posts, I saw some references to "server side code" that could dynamically change the menu class to what you have suggested. However, I haven't got a clue as to how I might do that.

    Thanks for replying. Please don't give up!

  10. #10
    Join Date
    Nov 2008
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    It's almost a month since I posed this problem. I sure hope people have not given up on me, much less the challenge.

    If I'm told that it can't be done with master pages, then I will accept that.

    But I'm curious about the "server side code" that has been mentioned elsewhere.

    Can someone chime in on this and help a designer who is trying to code?

    Thanks in advance...or, TIA...

Bookmarks

Posting Permissions

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