473,394 Members | 1,802 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Is it possible to "deactivate" the .visited state on a link?

Marty1963
I was 'playing' with rollover buttons in CSS, using an image background. Works beautifully ... until you click on the button. The 'visited' state stops the rollover effect. Can someone, with more experience than I have, suggest a solution?

I'm including my code below:

-------------------------------------------------------------

<style type="text/css" media="screen">
<!--

.rolloverbutton, a.rolloverbutton:visited {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
text-decoration:none;
font-weight: bold;
color: #FFFFFF;
line-height:30px;
background-image: url(graphic_02.gif);
background-repeat: no-repeat;
text-indent: 27px;
height: 29px;
width: 185px;
}

a.rolloverbutton:hover {
background-image: url(graphic_02-over.gif);
}

-->
</style>

<table width="185" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td><a href="index.php" class="rolloverbutton">Home</a></td>
</tr>
<tr>
<td><a href="news.php" class="rolloverbutton">News</a></td>
</tr>
<tr>
<td><a href="search.php" class="rolloverbutton">Search</a></td>
</tr>
</table>

Thanks in advance!
~Martin
Sep 27 '06 #1
4 3878
Don't the links have a background image to begin with?

What's the URL for the site?
Sep 28 '06 #2
Thank you for your help. You can find my test link at: http://www.kismedia.com/CSSTest/index.php . It's not for any specific site. I'm just trying to get a better understanding of CSS.

I managed to fix it a bit yesterday by taking the classes off the links and surround the whole thing with the sidemenu class, (see below) That fixed the BKG image rollover, however the text on the button still has the standard link default blue, purple and underline. Is there a way to override that too, or can you embed that within a style? The active text should be white and the rollover should be dark blue/black no text decoration on either.

Thanks again ~ Martin
--------------------------------------------------------

<style type="text/css" media="screen">
<!--

.SideMenu{
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
text-decoration:none;
font-weight: bold;
color: #FFFFFF;
line-height:30px;
}

.SideMenu a:link, .SideMenu a:visited, .SideMenu a:active {
background-image: url(images/graphic_02.gif);
background-repeat: no-repeat;
text-indent: 27px;
height: 29px;
width: 185px;
display:block;
}

.SideMenu a:hover {
color: #061F4B;
background-image: url(images/graphic_02-over.gif);
background-repeat: no-repeat;
text-indent: 27px;
height: 29px;
width: 185px;
}

-->
</style>

<div class="SideMenu">
<a href="index.php">Home</a>
<a href="news.php">News</a>
<a href="search.php">Search</a>
</div>
Sep 28 '06 #3
Banfa
9,065 Expert Mod 8TB
add the color style to

.SideMenu a:link, .SideMenu a:visited, .SideMenu a:active {
...
color: #cc3;
}
Sep 29 '06 #4
That fixed it! As usual, It's always the simplest solution. Thanks to everyone for your help.

~Martin
Sep 29 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: fartsniff | last post by:
Hello all. Can someone help out ? I found this PHP code that works just fine, however, I am trying to put it back into its original Javascript form. I am still learning the syntax, etc. for...
43
by: Dimitri Debruyne | last post by:
Hi group I am in the process of developing a website in XHTML Strict and CSS. Is there a way to open a link in a new window without the use of frames or Javascript or something ? I didn't find a...
18
by: Lorem Ipsum | last post by:
interesting! I just found a page in which Explorer's View Source does nothing! How did they do that?
1
by: Daniel Chou | last post by:
Hello, I have two questions about "not logged initially": 1. Before using "alter table tbname activate not logged initially", should the table be created with "not logged initially"? 2....
2
by: Bill Short | last post by:
Hello All, I have a popup form that is called from a command button on the main form. The main form's data source is tblA. The data source for the popup form is a query that is based on tblA. ...
5
by: Peter Verhelst | last post by:
Hello, Currently I am running an Access database on a windows WTS server, running Microsoft Windows 2000 server 5.00.2195 Service Pack 3. This database should be accessible for everybody in our...
9
by: Susan Bricker | last post by:
I am currently using the OnDirty event of a Form to detect whether any fields have been modified. I set a boolean variable. Then, if the Close button is clicked before the Save button, I can put...
6
by: Scotty | last post by:
What function is called in response to a click on "Close" on system menu (the "X" in the top right side of window)?
0
by: sagarp86 | last post by:
How to lock / deactivate "Refresh" and "Back" button on browser. Problem is in voting application. Once we click for a vote application goes to next page and increament one vote in the database....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.