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.

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/showthread.php?866732-Style-link-of-current-page

@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. :slight_smile:

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.

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. :wink: )