473,770 Members | 2,144 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Marty1963
4 New Member
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.rolloverbutto n: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.rolloverbutto n: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="rollover button">Home</a></td>
</tr>
<tr>
<td><a href="news.php" class="rollover button">News</a></td>
</tr>
<tr>
<td><a href="search.ph p" class="rollover button">Search</a></td>
</tr>
</table>

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

What's the URL for the site?
Sep 28 '06 #2
Marty1963
4 New Member
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.ph p">Search</a>
</div>
Sep 28 '06 #3
Banfa
9,065 Recognized Expert Moderator Expert
add the color style to

.SideMenu a:link, .SideMenu a:visited, .SideMenu a:active {
...
color: #cc3;
}
Sep 29 '06 #4
Marty1963
4 New Member
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
2464
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 Javascript, so I'm not really sure what needs to be removed and kept. I was trying the basic search/replaces, but always ended up with Javascript errors.
43
42820
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 way ... TIA
18
2556
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
5491
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. After using "alter table tbname activate not logged initially", how to deactivate it?
2
9228
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. The OnClose event of the popup attempts to change data in a text box on the main form if certain changes have been made on the popup. Because both use the same data source I have tried saving the record before attempting to make the changes, I...
5
2652
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 network, so for the time being, I have changed the permission for the .mdb file to Everone -> Full control (I know this is not professional, but I'll sort out the security issues later). When this database is opened, and closed again, it is...
9
15858
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 up a message on the screen that will tell the user that "Data has been changed, do you wish to Save the record before Closing this window?" I think I've just discovered this only works if the record that is being displayed/modified it not a...
6
1571
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
3528
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. But when we click on "Refresh" button on the browser, the query is fired again and again one vote is added un-necessarily..Only one vote should be posted from each pc / user. Same thing is with "Back" button on browser. when we click on vote,...
0
9618
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10260
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10101
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9906
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.