Multiple divs for a hover, changes color at end of webkit color transition
NickName:jspinella Ask DateTime:2013-10-07T06:31:14

Multiple divs for a hover, changes color at end of webkit color transition

I have a CSS file separate from the main CSS file for a page. Essentially there are three hyperlinks each with their own p tags, one under the other, and each has their own divs for specifying the webkit transition color for when they highlight. The colors all work great until the end of the webkit transition, at which point all three links change color to the color specified in the last class on the CSS (gray). I tried excluding that last class, and sure enough, the final color for all links became the color specified in the new "last class" (blue).

This happens only when I have visited the link, works fine when I clear cookies and don't click on any of the links. So it seems like something with a:visited, but as you can see, I have that covered (I think...).

Here's the CSS:

.orangelink a:link:hover,a:hover,a:visited:hover        {
color: #cc7839;
text-decoration:none;
/* font-weight:bold; */
-webkit-transition:color 0.5s ease-in; 
-moz-transition:color 0.5s ease-in;

}

.bluelink   a:link:hover,a:hover,a:visited:hover    {
color: #7290a4;
text-decoration:none;
/* font-weight:bold; */
-webkit-transition:color 0.5s ease-in; 
-moz-transition:color 0.5s ease-in;

}



.graylink   a:link:hover,a:hover,a:visited:hover        {
color:  #b0afaf;
text-decoration:none;
-webkit-transition:color 0.5s ease-in; 
-moz-transition:color 0.5s ease-in;

}  

Seems like I'm missing something small... To be clear, there is no interference from the main CSS file, a isn't defined at all except for the color of hyperlinks when they are inactive.

Copyright Notice:Content Author:「jspinella」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/19214746/multiple-divs-for-a-hover-changes-color-at-end-of-webkit-color-transition

More about “Multiple divs for a hover, changes color at end of webkit color transition” related questions

Multiple divs for a hover, changes color at end of webkit color transition

I have a CSS file separate from the main CSS file for a page. Essentially there are three hyperlinks each with their own p tags, one under the other, and each has their own divs for specifying the

Show Detail

CSS3 color transition on hover, but on click have immediate color change

I have coded my page so that when the cursor hovers over the link, it changes color gradually via CSS3. I want it so that when it is clicked, it changes immediately to another color. How can I do t...

Show Detail

Change border color of both divs when hover on one div in css

i have two divs and and i want if when i hover on one div, border color of both divs should be change... CSS : .uperdiv { width:80%; background-color:black; margin-left:10%; border-style:none solid

Show Detail

Transition color fade on hover?

I am trying to get this h3 to fade on hover. Can someone help me out? HTML <h3 class="clicker">test</h3> CSS .clicker { -moz-transition:color .2s ease-in; -o-transit

Show Detail

css hover color transition loop

I want to create a hover color transition but I want it to keep a loop of it. I was yellow transition to red then back to yellow and so on. I am unable to figure out how to loop it. Do I need to add

Show Detail

Overlapping divs on :hover

I have divs that grow heightwise on hover and on hover I want them overlap all other divs, and not push them like in my example. #container{ width: 300px; } #container a div{ float:left; width: 1...

Show Detail

CSS hover transition / transform background color scale

I want an element's background color to change and for the element to grow slightly on hover. The problem I have is that the background color is being applied on hover but it doesn't cover all of...

Show Detail

Font Awesome Hover transition Background color

I can't integrate a transition/animation coming from the top or bottom to the hover I have my hover but no transition or animation effect when changing background <section class="section__...

Show Detail

Text color not affected by transition?

I have text which is meant to fade from blue to yellow in 1 second. For some reason, even though the background color fades in the time set, the actual text of the hyperlink just changes to yellow

Show Detail

CSS background-color transition not working

using the following set of rules and style declarations .tableRow.even, .tableRowNS.even, .odd { background-color: #F2F2F2; } .tableRow.odd, .tableRowNS.odd, .even { background-color: white; } .

Show Detail