[Resolved] need help with css selection

Home Forums Support [Resolved] need help with css selection

Home Forums Support need help with css selection

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1252488
    Ashok

    I am trying to add following css onto my child them in the file style.css
    the first one is to custom selection color that i found in this group and second one is to change the link color on the right sidebar

    **********************************
    // STYLE FOR CUSTOM SELECTION COLOR
    ::selection {
    background: #ed008c!important;
    color: white;
    }
    // STYLE FOR SIDEBAR LINK COLOR
    .rpwe-img h3 {
    color:#ed008c!important;
    }
    **************************
    i am using “tasty” theme. I am not sure where i am wrong, i disabled all the cache plugin, purging cache but still not see the changes on the fron end.
    Can someone poing me to the right direction please.

    #1252865
    David
    Staff
    Customer Support

    Hi there,

    first off you have several PHP codes snippets in your child theme style.css
    Every line before this line is PHP:

    // STYLE FOR CUSTOM SELECTION COLOR

    PHP needs to be added to your child themes function.php
    More info here:

    https://docs.generatepress.com/article/adding-php/

    Secondly this // STYLE FOR CUSTOM SELECTION COLOR is a valid comment in PHP but it is not valid for CSS. Instead you use:

    /* This is a valid CSS Comment */

    So remove the PHP and the invalid comments and try this CSS:

    /* Change selection colors */
    ::selection {
        background: #ed008c !important;
        color: white;
    }
    
    /* Change Related Post widget title color */
    h3.rpwe-title a {
        color: #ed008c !important;
    }
    #1254241
    Ashok

    perfect..thanks

    #1254832
    David
    Staff
    Customer Support

    You’re welcome

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.