Home › Forums › Basel support forum › CSS to format URLs but exclude some classes?
CSS to format URLs but exclude some classes?
- This topic has 6 replies, 2 voices, and was last updated 4 years, 5 months ago by Elise Noromit.
-
AuthorPosts
-
May 9, 2020 at 12:28 pm #193653
oleg_dmitrievParticipantHi Elise, can you please help?
I am trying to have links by default in this fashion (color: #C41E3A; text-decoration: underline;), and I have added this CSS. But I have a problem because some classes look bad – for example .btn.btn-style-link (here, at the bottom of the page)
How can I exclude several classes at once?
This is my css below:/*Change default dressing of links*/
a:not(.tabs wc-tabs) {
color: #C41E3A;
text-decoration: underline;
}
a:hover {
color: red;
}
.wpb_wrapper a {
color: #C41E3A;
text-decoration: underline;
}
.wpb_wrapper a:hover {
color: red;
}
.woocommerce-product-attributes-item__value a {
color: #C41E3A;
text-decoration: underline;
}
.woocommerce-product-attributes-item__value a:hover {
color: red;
}May 9, 2020 at 7:47 pm #193727
Elise NoromitMemberHello,
Please provide the page URL and screen which links you want to change.
Best Regards
May 10, 2020 at 11:45 am #193832
oleg_dmitrievParticipantElise,
Thank you for helping me. I do not want my style changes to apply to the followng classes:
https://ibb.co/P5Ptmym (the URL is https://www.independent.wine)It is not showing well, it has double underscore. How can modify my CSS not to apply to this style?
Other than that, my CSS seem to be working OK.
/*Change default dressing of links*/
a:not(.tabs wc-tabs) {
color: #C41E3A;
text-decoration: underline;
}
a:hover {
color: red;
}
.wpb_wrapper a {
color: #C41E3A;
text-decoration: underline;
}
.wpb_wrapper a:hover {
color: red;
}
.woocommerce-product-attributes-item__value a {
color: #C41E3A;
text-decoration: underline;
}
.woocommerce-product-attributes-item__value a:hover {
color: red;
}May 11, 2020 at 10:50 am #194052
Elise NoromitMemberHello,
In order to remove the line add this code:
body .btn.btn-style-link:hover, body .btn.btn-style-link{ border:none; text-decoration:none; }
And remove this code from your custom CSS:
Best Regards
May 11, 2020 at 11:36 am #194071
oleg_dmitrievParticipantHi Elise, thanks very much!
May 11, 2020 at 12:11 pm #194089
oleg_dmitrievParticipantElise, no, that did not work 🙂
When I change to the new code according to your instruction, all my links everywhere switch to black color, see here https://ibb.co/4JYYvmR. This is not what I want, I them to be a {color: #C41E3A; and text-decoration: underline;}, and a:hover {color: red;})
Basically, all I want is to exclude the class of “Read more” from the rule that makes the second underline: https://ibb.co/n8w033v
Maybe I misunderstand your instruction (probably :))) sorry!
Can you please send a full piece of code, to be safe?– NEW CODE –
/*Change default dressing of links*/
a:not(.tabs wc-tabs) {
color: #C41E3A;
text-decoration: underline;
}
a:hover {
color: red;
}body .btn.btn-style-link:hover,
body .btn.btn-style-link{
border:none;
text-decoration:none;
}.woocommerce-product-attributes-item__value a {
color: #C41E3A;
text-decoration: underline;
}
.woocommerce-product-attributes-item__value a:hover {
color: red;
}– OLD CODE –
/*Change default dressing of links*/
a:not(.tabs wc-tabs) {
color: #C41E3A;
text-decoration: underline;
}
a:hover {
color: red;
}
.wpb_wrapper a {
color: #C41E3A;
text-decoration: underline;
}
.wpb_wrapper a:hover {
color: red;
}
.woocommerce-product-attributes-item__value a {
color: #C41E3A;
text-decoration: underline;
}
.woocommerce-product-attributes-item__value a:hover {
color: red;
}May 12, 2020 at 9:32 am #194283
Elise NoromitMemberHello,
The code I have recently provided does not set any colors at all. Perhaps you added the code earlier. You need to find and delete this code. Disable code one by one by comments to detect which one influences. Seems you have CSS mixture. You need to differentiate.
Best Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register