Pradeep_Chinna Posted August 25, 2013 Share Posted August 25, 2013 firstly, please go though this image (img.jpg). so that you can understand easily. how to highlight the selected link in menu bar. like, if we select one link then it should get different color background. and Rest of links should get default color. i.e., link represents your current page in particular website I hope you understood. HELP me... Quote Link to comment https://forums.phpfreaks.com/topic/281535-how-do-i-set-background-to-selected-link/ Share on other sites More sharing options...
cyberRobot Posted August 27, 2013 Share Posted August 27, 2013 PHP could be utilized to determine which page is being viewed. If the page matches one of the links in the menu bar, a class attribute could be added dynamically (with PHP) so the link is highlighted. Perhaps something here will help: https://www.google.com/search?q=dynamically+highlight+links+in+website+navigation+with+php Quote Link to comment https://forums.phpfreaks.com/topic/281535-how-do-i-set-background-to-selected-link/#findComment-1447061 Share on other sites More sharing options...
Love2c0de Posted September 1, 2013 Share Posted September 1, 2013 I've also just done the exact same thing but using JavaScript. Better to go for server-side though! Kind regards, L2c. Quote Link to comment https://forums.phpfreaks.com/topic/281535-how-do-i-set-background-to-selected-link/#findComment-1447655 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.