SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    936
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    How this menu works?

    Hi guys

    Just wondering how the menu in sitepoint.com works?

    Just like this also below,
    http://thefml.org.uk/imgs/menu-sample.jpg

    If you click any of the button the white color stay while you are on the particular page.
    For example if you click home button it stay white color or red and the same with the other buttons?
    But of course it has hover color effects also?

    How to do this?

    Thanks in advanced.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,170
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Hi solidcodes. There are lots of ways to do this—with CSS, PHP or JavaScript. With CSS, it's done with classes/IDs on each menu item and on the body element of each section. With JS it's done with a simple script that looks at the URL and adds styling to the link that matches. With PHP (or other server side languages) you add in a special "current" class to the link.

    This thread will give you some details of what to look at: http://www.sitepoint.com/forums/show...f-current-page

  3. #3
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    936
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    @ralph

    Thanks I"m interested with the CSS.
    I will read that later.

    thanks again.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,170
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by solidcodes View Post
    @ralph

    Thanks I"m interested with the CSS.
    I will read that later.

    thanks again.
    Cool, no problem. Do post back if you have any questions. And let us know how you go.

  5. #5
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    936
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Unfortunately it did not worked.
    Or maybe I"m too sleepy.
    I'll try later maybe it work.

    Be right back to post my update.

    By the way my site is under a framework.

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,170
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by solidcodes View Post
    Be right back to post my update.
    Great. If you can't post a live link, then post some code we can run in our browsers for testing. (Test it first yourself. )


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
  •