
December 17th, 2002, 08:32 PM
|
|
Registered User
|
|
Join Date: Apr 2007
Posts: 22,309
Time spent in forums: < 1 sec
Reputation Power: 25
|
|
|
PHP and .CSS working together in links
Well... here is the problem. At the navigation bar I need the page link to turn black when you click that link... so it was grey before when your not on that page, but when your on the page its black. Basically I'm using .css, so Im changing it from "nav" to "nav2".
Heres the code:
php Code:
Original
- php Code |
|
|
|
<?php $home = "home"; $bios = "bios"; $about = "about"; $media = "media"; $shows = "shows"; $thanks = "thanks"; $contact = "contact"; $links = "links"; $merch = "merch"; $streetteam = "street-team"; $_home = "mainpage.htm"; $_bios = "bios.htm"; $_about = "about.htm"; $_media = "media.htm"; $_shows = "shows.htm"; $_thanks = "thanks.htm"; $_contact = "contact.htm"; $_links = "links.htm"; $_merch = "http://members.lycos.co.uk/soldoutrecords/merch.htm"; $_streetteam = "streetteam.htm"; $n2home = "nav2"; $n2bios = "nav2"; $n2about = "nav2"; $n2media = "nav2"; $n2shows = "nav2"; $n2thanks = "nav2"; $n2contact = "nav2"; $n2links = "nav2"; $n2merch = "nav2"; $n2streetteam = "nav2"; $nhome = "nav"; $nbios = "nav"; $nabout = "nav"; $nmedia = "nav"; $nshows = "nav"; $nthanks = "nav"; $ncontact = "nav"; $nlinks = "nav"; $nmerch = "nav"; $nstreetteam = "nav"; $navselect = "$home"; $updated = "17/12/02"; $thispage = $main; $head = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><html><head><title>SecondMonday</title><meta name='Author' content='Will Law'><meta name='Keywords' content='secondmonday, second, monday, SecondMonday, Second Monday, SecondMonday UK, UK, Punk, Rock, Punk Rock, Emo, Emo-Hardrock, Will Law, James Hopkinson, Fred Furber, Rich Rowe'><meta name='Description' content='SecondMonday are a band from south England playing pop-punk to emo-hardrock.'></head>"; $nav = "<body bgcolor='#000000' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'><span class='one'><center><table cellspacing='0' cellpadding='0' width='700'><td bgcolor='#eeeeee' background='images/corner.jpg' width='300' height='70'></td><td bgcolor='#222222' width='1' height='70'></td><td bgcolor='#eeeeee' background='images/topright.jpg' width='399' height='70' align='left' valign='bottom'><span class='one'><font color='#999999'> designed/programmed: will law | photography: will law, fred furber<br> site best viewed at 800x600+ resolution | <font color='#555555'>last updated: $updated</font><br> all material, unless otherwise stated is copyright © secondmonday</font></span></td></table><table cellspacing='0' cellpadding='0' width='700'><tr><td bgcolor='#000000' width='700' height='1'></td></tr><tr><td bgcolor='#eeeeee' style='background-image: url(images/secondmonday.gif); background-repeat: no-repeat;' width='700' height='20'><table cellspacing='0' cellpadding='0' width='700'><td background='images/navleft.jpg' width='26' height='20'></td><td width='648' height='20' align='right' valign='middle'><span class='two'><a href='$_home' onFocus='if(this.blur)this.blur()' class='$nhome'>$home</a> <a href='$_bios' onFocus='if(this.blur)this.blur()' class='$nbios'>$bios</a> <a href='$_about' onFocus='if(this.blur)this.blur()' class='$nabout'>$about</a> <a href='$_media' onFocus='if(this.blur)this.blur()' class='$nmedia'>$media</a> <a href='$_shows' onFocus='if(this.blur)this.blur()' class='$nshows'>$shows</a> <a href='$_thanks' onFocus='if(this.blur)this.blur()' class='$nthanks'>$thanks</a> <a href='$_contact' onFocus='if(this.blur)this.blur()' class='$ncontact'>$contact</a> <a href='$_links.htm' onFocus='if(this.blur)this.blur()' class='$nlinks'>$links</a> <a href='$_merch' onFocus='if(this.blur)this.blur()' class='$nmerch' target='_blank'>$merch</a> <a href='$_streetteam' onFocus='if(this.blur)this.blur()' class='$nstreetteam'>$streetteam</a></span></td><td background='images/navright.jpg' width='26' height='20'></td></table></td></tr><tr><td bgcolor='#000000' width='700' height='1'></td></tr></table>"; $main = '<table cellspacing="0" cellpadding="0" width="675"><td bgcolor="#ffffff" style="background-image: url(images/mainbg.jpg); background-repeat: no-repeat;" width="675" height="246"><span class="one"><table cellspacing="0" cellpadding="0" width="675"><td width="378" align="left" valign="top"><iframe src="news.htm" width="378" height="246" frameborder="0" name="newsframe">Your browser does not support frames, please update it.</iframe></td><td width="297" align="left" valign="top"><table cellspacing="0" cellpadding="0" width="297"><td height="50" align="center" valign="middle"><span class="two"><form method="link" action="mailinglist.htm"><input class="TextBox" type="submit" value="subscribe to the mailing list"></form></span></td></table><table cellspacing="0" cellpadding="0" width="297"><td width="297" height="174" align="center" valign="top"><span class="two"><img src="images/reviews/cuttingties.jpg" border="1"></span></td></table><table cellspacing="0" cellpadding="0" width="297"><td width="10" height="1"></td><td bgcolor="#000000" width="287" height="1"></td></table><table cellspacing="0" cellpadding="0" width="297"><td width="10" height="1"></td><td bgcolor="#000000" width="1" height="15"></td><td bgcolor="#eeeeee" width="286" height="15" align="left" valign="top"><span class="two"> <a href="cuttingties.htm" onFocus="if(this.blur)this.blur()" class="nav" target="newsframe">cutting the ties between enemies and friends</a></span></td></table><table cellspacing="0" cellpadding="0" width="297"><td width="10" height="1"></td><td bgcolor="#000000" width="287" height="1"></td></table><table cellspacing="0" cellpadding="0" width="297"><td height="5"></td></table></td></table></span></td><td bgcolor="#555555" width="1"></td></table>'; print "<link rel='stylesheet' href='stylesheet.css' type='text/css'>"; if($thispage = $main){ $nhome = $n2home; //here is where it should change from grey to black } else { } ?>
If you could help it would be great.. thanks!
Will
|