Forum Moderators: not2easy
Is the only way to do this to make if statement? like this:
if ($_SERVER['PHP_SELF'])=="/inbox.php") {echo "font-weight: bold;";}
Thank you
a.inbox:link {color: #666666; text-decoration: underline; font-family: arial; font-size: 17px;}
a.inbox:visited {color: #666666; text-decoration: underline; font-family: arial; font-size: 17px;}
a.inbox:hover {color: #666666; font-weight: bold; text-decoration: none; font-family: arial; font-size: 17px;}
a.inbox:active {color: #666666; font-weight: bold; text-decoration: none; font-family: arial; font-size: 17px;}
<div id="newmessages">
<a class="inbox" href="<?php echo $_SERVER['PHP_SELF']."?p=new" ?>">New messages</a>
</div>
<div id="alreadychecked">
<a class="inbox" href="<?php echo $_SERVER['PHP_SELF']."?p=read" ?>">Already checked</a>
</div>
<div id="sent">
<a class="inbox" href="<?php echo $_SERVER['PHP_SELF']."?p=send" ?>">Sent</a>
</div>
<div id="newmessage">
<a class="inbox" href="<?php echo $_SERVER['PHP_SELF']."?p=write" ?>">Write a message</a>
</div>
I have a feeling you mean something completely different by
active than what it actually does. An
active link is only active while it is being clicked. It has nothing to do with the page you are currently on. For that, throw another little PHP snippet on that adds a secondary class: current. Then style that differently.