•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 360,998 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,475 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 3667 | Replies: 3
![]() |
•
•
Join Date: Jun 2005
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
I like to know if CSS can be used to highlight the CSS nav menu if the current page is the page that the menu links to. For example, the folowing code is my side bar navigation menu.
How do add to this or modify this code so that the nav menu will be hightlighed if the use is on that current page?
Your help is appreciated.
ljCharlie
#lftSideMenu {
float: left;
width: 165px;
margin: 0 0px 0 0;
background-color: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
font-weight: normal;
padding-bottom: 5px;
padding-left: 5px;
}
#lftSideMenu ul {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
list-style-type: none;
margin-left: 0px;
padding-left: 0px;
color: #000066;
font-weight: bold;
}
#lftSideMenu li {
margin: 0px;
padding: 0px;
}
#lftSideMenu A:link{
padding: 0px 0px 0px 5px;
text-decoration: none;
display: block;
width: 100%;
margin: 0px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #000000;
}
#lftSideMenu A:visited{
padding: 0px 0px 0px 5px;
text-decoration: none;
display: block;
width: 100%;
margin: 0px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #000000;
color: #0000CC;
}
#lftSideMenu A:hover{
font-weight: bold;
background-color: #FFCC99;
color: #000033;
text-decoration: none;
margin: 0px;
padding: 0px 0px 0px 5px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #000000;
}
#lftSideMenu A:active {
background-color: #FF6600;
}How do add to this or modify this code so that the nav menu will be hightlighed if the use is on that current page?
Your help is appreciated.
ljCharlie
•
•
Join Date: Sep 2006
Location: California
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
Hi
Not a very timely reply, sorry. I just joined the board. However, for those looking for a solution, albeit cumbersome, take a look here:
http://www.hicksdesign.co.uk/journal...-page-with-css
Dan
Not a very timely reply, sorry. I just joined the board. However, for those looking for a solution, albeit cumbersome, take a look here:
http://www.hicksdesign.co.uk/journal...-page-with-css
Dan
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
- change the font/color of the selected text on a web page through javascript (JavaScript / DHTML / AJAX)
- Go to a certain page when button is pressed and do it securely (ASP.NET)
- to display the idle time of current page (Java)
- IE "Toys" - Offer Customizability (Web Browsers)
- trying to create an online contents menu (PHP)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: web page overlay help please
- Next Thread: Javascript Problem....


Linear Mode