How can I apply a filter over an image link?

Viewed 28

I am trying to add styling to a visited link that is embedded onto an image. I would like the image to turn grayscale after the link has been visited but I cannot seem to get it to work. I've tried to apply the styling to the .image property too but the grayscale filter is still not working at all. I am using this code on cargo.site, not sure if this makes any difference though... Here is the code I am using:

<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">

<style>
* {
  box-sizing: border-box;
}

.column {
  background-color: #000;
  float: left;
  width: 50%;
  max-height: 35vw;
  padding: none;
}

/* Remove extra left and right margins, due to padding */
.row {
  margin: 0 -5 0 -5;
}

/* Clear floats after the columns */
.row:after {
  content:"";
  padding: 0;
  display: table;
  clear: both;
}

/* Responsive columns */
@media screen and (max-width: 600px) {
  .column {
    width: 100%;
    min-height: 65vw;
  }
}

.container {
  padding: 0;
  position: relative;
  text-align: center;
}

.image {
    -webkit-filter: brightness(60%);
     transition: all .33s ease;
}

a:hover .image {
    -webkit-filter: brightness(85%);
    -webkit-transition: all .33s ease;
    -moz-transition: all .33s ease;
    -o-transition: all .33s ease;
    -ms-transition: all .33s ease;
    transition: all .33s ease;
    cursor: pointer;
}

a:link{
color: #fff;
cursor: pointer;
}

  a:visited{
    -webkit-filter: grayscale (1);
    
  }

.title{
  font-family: "Helvetica Neue", Helvetica, sans-serif, "Helvetica   Neue Regular", Icons;
  font-size: 10vmin;
  color: white;
  position: absolute;
  opacity:  1;
  padding: 0;
  top: 50%;
  left: 50%;
  text-align: center;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  transition: all .33s ease;

  
}

.date {
  font-family: "Helvetica Neue", Helvetica, sans-serif, "Helvetica   Neue Regular", Icons;
  font-size: 5vmin;
  color: white;
  text-align: center;
  font-weight: 400;
  transition: all .33s ease;

}

</style>

<section>
<div class="row">
  <div class="column">
    <div class="container">
      <a href="#" rel="history"><img class="image" src="https://freight.cargo.site/t/original/i/9f804a9700e1be685a2f382b246ae88a5d0547a043d90f4fb5526547ad2159a0/FASTLANE_Comrie_62x75cm_Oil-on-Linen_Crop_v02.jpg" style="width: 100%;" alt="Issue 2: Cover Image">
       </a>
      </div>
    </div>
    
    <div class="column">
    <div class="container">
      <a href="#" rel="history"><img class="image" src="https://freight.cargo.site/t/original/i/c9228501460781092300db921381bddcfdf7376b1d78b1d953fbe30800702051/Cover-image-crop_v01.jpg" style="width: 100%;" alt="Issue 1: Cover Image">
       </a>
      </div>
    </div>    
  </div>
</section>

0 Answers
Related