Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #103158
    LedZappa
    Participant

    How can I allow visitors to select and copy text on my website.

    Using Icon 2
    http://www.visteka.com

    Thanks

    #103193
    Rad
    Moderator

    Hi there,

    Thanks for posting in.

    The texts at your site are selectable. I can even right click them to copy. X does not modify this default selection behavior. Or, are you referring to have additional functionality where user can just easily click copy? If yes, then we can’t support this kind of customization. But still possible by 3rd party plugin or by consulting a wordpress developer.

    Thanks!

    #103204
    LedZappa
    Participant
    This reply has been marked as private.
    #103240
    Rad
    Moderator

    Hi there,

    Okay, thanks for clarification.

    Add this css at your customizer’s custom css under Admin > Appearance with your preferred color.

    ::selection {
      background: #ffb7b7 !important;
    }
    ::-moz-selection {
      background: #ffb7b7 !important;
    }

    Cheers!

    #103261
    LedZappa
    Participant

    That worked, but I am curious. I find CSS code to use, but it never seems to work. Sometimes it has a different prefix or is completely different than what you have supplied that works. Is there a special type of css I should be searching for that is WordPress specific or something.

    In this case the one I found didn’t work. It appears that “!important” was the missing part. but usuall it is a prefix or “global” is added as well.

    I kept searching and found a plugin that worked, but you posted the answer before I could come back and let you know, so thanks for your quick reply.

    Here is what I had tried to put in my child theme CSS

    ::selection {
    background: #ffb7b7; /* WebKit/Blink Browsers */
    }
    ::-moz-selection {
    background: #ffb7b7; /* Gecko Browsers */
    }

    Thanks for your help!

    #103285
    Rad
    Moderator

    Hi there,

    Yes, you may wish to use !important for letting the browsers that it is more prioritized. Or else, it will use recently declared styling.

    If you will use a plugin then be sure that you removed !important from any custom css, OR add !important to your plugin’s styling too.

    Hope this helps.

    #103905
    LedZappa
    Participant

    Got it done without plug-in.

    Thanks for your help.

    #103923
    Darshana
    Moderator

    Glad we were able to help 🙂 .

  • <script> jQuery(function($){ $("#no-reply-103158 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>