Site logo

Archived topic

Prevent Link Styling from Being Applied to Icons

1 reply · Started by Py on May 6, 2022

Viewing posts 1–2 of 2

Hi

I am using the following css to add a line below each link that turns solid when hovered.

/* Dotted Links */
.entry-content a {
    font-weight: bold !important;
		text-decoration: none;
		padding-bottom: 3px;
	  border-bottom: dashed 1px;
}

.entry-content a:hover
{
    border-bottom: solid 2px;
}

However this style is getting applied to my contact form social media icons as well. Please check below email:

https://passivebook.com/contact/

Facebook, Twitter and Other social icons have this style applied. How do I remove this style?

Hi there,

you can limit the style to only links within a paragraph like so:

/* Dotted Links */
.entry-content p a {
    font-weight: bold !important;
    text-decoration: none;
    padding-bottom: 3px;
    border-bottom: dashed 1px;
}

.entry-content p a:hover {
    border-bottom: solid 2px;
}

That will stop those icons and buttons from being affected.

This archived topic is closed to new replies.