Home Forums Basel support forum CSS to format URLs but exclude some classes?

CSS to format URLs but exclude some classes?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #193653

    oleg_dmitriev
    Participant

    Hi 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;
    }

    #193727

    Hello,

    Please provide the page URL and screen which links you want to change.

    Best Regards

    #193832

    oleg_dmitriev
    Participant

    Elise,

    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;
    }

    #194052

    Hello,

    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:

    https://prnt.sc/semrdb

    Best Regards

    #194071

    oleg_dmitriev
    Participant

    Hi Elise, thanks very much!

    #194089

    oleg_dmitriev
    Participant

    Elise, 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;
    }

    #194283

    Hello,

    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

Viewing 7 posts - 1 through 7 (of 7 total)