-1

I'm unable to change/remove the link underline and color of the nested text. I checked the debug console and the color says it's inherited from a.masonry-item. I tried changing it but it doesn't do anything. If I change the color from the debug console, it does trickle down. What am I doing wrong?

a.masonry-item {
  text-decoration: none;
  color: red;
}
<a href="#" class="masonry-item">
  <div class="card masonry-content">
    <img src="https://picsum.photos/450/325?image=100" alt="Dummy Image" />
    <div class="card-body">
      <h5 class="card-title">Card title</h5>
      <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
    </div>
  </div>
</a>

My expected result is red text with no underline but it has no effect.

Miroslav Glamuzina
  • 4,472
  • 2
  • 19
  • 33
Tong
  • 697
  • 1
  • 8
  • 16

1 Answers1

1

You can force the removal of any property in CSS by using "!important".

For example:

a.masonry-item {
    text-decoration: none !important;
    color: red;
}