SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2003
    Location
    Europe :-)
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How is this done?

    At http://www.gospelcom.net/
    You could find "navbar" which is "active" (with orange color) when You are visiting that specific section?

    How could I do that as is on that site...

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    If you rightClick and view the source, you will see the code the site uses -- onmouseover

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  3. #3
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Vinnie - he's talking about the permanent orange color on the currently viewed nav selection (at the top)

    They just use a CSS class, "mainMenuSelected"
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  4. #4
    SitePoint Enthusiast
    Join Date
    Apr 2003
    Location
    Europe :-)
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes beetle...THAT IS WHAT I'm looking for ... so How I could do that ...

    I need
    /* The main menu selected colors */
    .mainMenuSelected {
    color: #FF9933;
    font-weight: bold;
    font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
    font-size: 10px;
    text-decoration: none;
    }
    .mainMenuSelected:visited {
    color: #FF9933;
    }
    .mainMenuSelected:hover {
    color: #cc6600;
    text-decoration: none;
    }

    and what else
    <a href="/" class="mainMenuSelected">Home</a>

    to have this above
    <a href...
    on every click on navbar section.

    cos

    WHEN YOU ARE click on different section pageosurce is always different with
    <a href="/" class="mainMenuSelected">home or about us or links or etc...

  5. #5
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, since it can be viewed in the HTML, they didn't do it with javascript. Are you wanting a javascript solution?
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  6. #6
    SitePoint Enthusiast
    Join Date
    Apr 2003
    Location
    Europe :-)
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No...If I could do this on another way...css...any suggestions

  7. #7
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, half of the solution is going to be CSS. The other half (applying that CSS) is up to you. As I see it, you pretty much have 3 choices

    1) Hard-code it into the HTML for every page
    2) Use javascript to set the className on page load
    3) Use a server-side (PHP, ASP, etc) program to code it into the HTML (same as #1, but a dynamic environment).
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  8. #8
    SitePoint Enthusiast
    Join Date
    Apr 2003
    Location
    Europe :-)
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey beetle (or anybody else) any suggestions for php+css solution ....


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
  •