|
-
Jun 27th, 2005, 04:51 PM
#1
Thread Starter
Fanatic Member
Link Color [RESOLVED]
This is going to be a little confusing, try to bare with me.
I have a template file that I require at the top of every page.
Within the template file I have links (for various parts of the site).
Code:
<STYLE TYPE="text/css">
a.top:link { color: white; text-decoration: none }
a.top:active { color: black; text-decoration: none }
a.top:visited { color: white; text-decoration: none }
a.top:hover { color: black; text-decoration: none }
</SCRIPT>
Above is the code I use to setup the link colors.
Now what I need to have happen is, once a link is clicked and the new page loads. I need to have the link of the current page stay black.
Only way I was able to do this is by putting the links on every page instead of the template.
Can anyone suggest how this can work?
Thanx!
Last edited by Dim; Jun 27th, 2005 at 07:09 PM.
Dim
-
Jun 27th, 2005, 07:08 PM
#2
Thread Starter
Fanatic Member
Re: Link Color
Thanx, seemed to have resolved it on my own.
For anyone that might face a simliar situation:
PHP Code:
//I set a variable to the current page.
$currpage = $_SERVER["PHP_SELF"]; // is /page.php
Then I while reading the page names from the DB, I compared it to the current page and set the font color to black when the page was the currpage.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|