Hello everyone, I ran into a problem, is it possible not to change and remove completely the color of the visited link in css? I’m digging Google, everywhere it’s written to put the same color as the text color, but this option doesn’t work because there are different blocks on the site with different colors. thank

  • one
    What is "remove color"? Make the link color equal to the background color? - Anton Shchyrov

3 answers 3

a, a:visited, a:hover, a:active { color: inherit; } 

It can be so.

    You said that "there are different blocks on the site with different colors", i.e. These blocks have their own class, which you can use.

    For example, you use blocks with the class .a1 and .a2 . If you need to change the color of the visited link in .a1 , then do this:

     .a1 a:visited {color: #07f;} 

    And if you need to change the color of the visited link everywhere except for these DIVs, then write this:

     a:visited {color: #07f;} .a1 a:visited, .a2 a:visited {color: #00f;} 

      Decided, assigned to each block the color of the visited link as the color of the block. For example

       .int a:visited { color:blue; } 
      • Why minus? If a person answered your own question? - hovdev