Jump to content

Recommended Posts

Hi can anyone help please, active is not working  ???,

I am calling header file in every page, thus I assume its overwritting the active:, I tried assigning class to my hyperlinks and calling them in my css sheet but still the same and tried every other advise i had non works.  Please help.  I just wanted to highlight the current active link as bold and beautifull, so the user knows the current active page.
header.php

[code]<div id="menu">

<a  href="<?php echo $config_basedir; ?>">Home</a> &bull;
<a  href="<?php echo $config_basedir; ?>about.php">About</a>&bull;
<a  href="<?php echo $config_basedir; ?>register.php">Register</a>&bull;
<a  href="<?php echo $config_basedir; ?>faq.php">FAQ's</a>&bull;
<a  href="<?php echo $config_basedir; ?>tech.php">Technical Details</a>&bull;
<a  href="<?php echo $config_basedir; ?>contact.php">Contacts</a>

</div>
[/code]

and my css stylesheet is something like this:

[code]#menu {

font-family: "trebuchet ms", verdana, sans-serif;
text-decoration: none;
font-size: 14px;
font-weight: normal;
position: absolute;
height: 27px;
top: 60px;
left: 0px;
width: 100%;
padding: 0px;
color: #000000;
background-color: #eee;

}

a:link {
text-decoration: none;
color: #000;
}

a:visited  {
text-decoration: none;
border-bottom: 1px dotted #369;
color: #000;
}

a:hover {
text-decoration: underline;
font-size: 125%;
border-bottom: 1px solid #036;
color: #000;
}

a:active {
  text-decoration: underline;
font-weight: bolder;
border-bottom: 1px solid #036;
color: blue;
  }[/code]

[b]EDITED BY WILDTEEN88: Please place code within code tags [nobbc]([code][/code])[/nobbc]

Link to comment
https://forums.phpfreaks.com/topic/32565-hover-works-active-not-please-help/
Share on other sites

a:active should be placed before a:hover io believe.

Also AXISS the forum converts [nobbc]</a>[/nobbc] to [/url] for some odd reason. To stop this you should post all code into code tags! ([nobbc][code][/code][/nobbc]).
For some reason active only works in certain browsers. The only browser I got it to work on is IE(7 - I don't know weather IE6 or below supports it). Also you will only get to see the active style when you hold down the mouse button on the link. I don't think active is that import.

I always style :link and :active the same.
Yes u r right and as soon as the new page download, it disappears.  I am stuck, I just want to highlight the current page link.  that's all, is there any way i can assign value to this link <a id="xyz" href "#" </a> and than capture in javascript to change the size of the text and color.?
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.