sayedsohail Posted January 2, 2007 Share Posted January 2, 2007 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> • <a href="<?php echo $config_basedir; ?>about.php">About</a>• <a href="<?php echo $config_basedir; ?>register.php">Register</a>• <a href="<?php echo $config_basedir; ?>faq.php">FAQ's</a>• <a href="<?php echo $config_basedir; ?>tech.php">Technical Details</a>• <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 More sharing options...
AXiSS Posted January 2, 2007 Share Posted January 2, 2007 First I think you need </a> not [/url] in your html code,Second is I dont think a:active is a valid CSS property, I tried looking it up on w3schools.com and didn't find it. Link to comment https://forums.phpfreaks.com/topic/32565-hover-works-active-not-please-help/#findComment-151411 Share on other sites More sharing options...
wildteen88 Posted January 2, 2007 Share Posted January 2, 2007 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]). Link to comment https://forums.phpfreaks.com/topic/32565-hover-works-active-not-please-help/#findComment-151421 Share on other sites More sharing options...
sayedsohail Posted January 2, 2007 Author Share Posted January 2, 2007 Thanks for the help, I tried placing active before hover, still it doesn't work. Link to comment https://forums.phpfreaks.com/topic/32565-hover-works-active-not-please-help/#findComment-151431 Share on other sites More sharing options...
wildteen88 Posted January 2, 2007 Share Posted January 2, 2007 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. Link to comment https://forums.phpfreaks.com/topic/32565-hover-works-active-not-please-help/#findComment-151438 Share on other sites More sharing options...
sayedsohail Posted January 2, 2007 Author Share Posted January 2, 2007 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.? Link to comment https://forums.phpfreaks.com/topic/32565-hover-works-active-not-please-help/#findComment-151461 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.