I am in the process of building a website using WordPress with the 2017 theme. I recently added a link to my page by inserting the following HTML code:
<a href="www." target="_blank"><span style="color: #0000ff;">text</span></a>
After adding the link, I needed to remove the underline that WordPress automatically adds to links. To achieve this, I included the following CSS:
.entry-content a, .entry-summary a, .taxonomy-description a, .logged-in-as a, .comment-content a, .pingback .comment-body > a, .textwidget a, .entry-footer a:hover, .site-info a:hover {
box-shadow: 0px 0px 0px 0px !important;
}
My current objective is to change the color of the hyperlink text when a user hovers over it. In order to accomplish this, I updated the CSS with the following code:
a:hover {
color: black;
background-color: transparent;
}
However, there seems to be an issue as the text color was initially set to #0000ff
and while the background color changed upon hovering, the text color remained blue. I attempted to use !important
and even tried changing the color to red #FF0000
, but the desired effect was not achieved.
I went back to the HTML code to remove the text color altogether to test if the issue was related to conflicting styles, however, even when the text color was plain black, it did not change to red when hovered over.
Am I overlooking something crucial?