Jump to content

hover works active not? Please help


sayedsohail

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

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.?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.