User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Jun 2005
Posts: 6
Reputation: ljCharlie is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ljCharlie ljCharlie is offline Offline
Newbie Poster

Help Highlight the text menu if on current page

  #1  
Jun 10th, 2005
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.

#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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2005
Posts: 232
Reputation: Dogtree is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 2
Dogtree's Avatar
Dogtree Dogtree is offline Offline
Posting Whiz in Training

Re: Highlight the text menu if on current page

  #2  
Jun 10th, 2005
Generally, if your description of the functionality relies on the word 'if', you probably need some form of conditional, which CSS doesn't natively provide. You're looking at a PHP/CSS or Javascript hack as your best option.
Reply With Quote  
Join Date: Jun 2005
Posts: 6
Reputation: ljCharlie is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ljCharlie ljCharlie is offline Offline
Newbie Poster

Re: Highlight the text menu if on current page

  #3  
Jun 13th, 2005
Thank you for your response. I guess I'll have to seek other alternatives then.

ljCharlie
Reply With Quote  
Join Date: Sep 2006
Location: California
Posts: 7
Reputation: hgltd is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
hgltd hgltd is offline Offline
Newbie Poster

Re: Highlight the text menu if on current page

  #4  
Sep 16th, 2006
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
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 6:57 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC