• Resolved crowesnest

    (@crowesnest)


    I’m trying to change the text anchor colors using a class. I’ve created a class with the following settings:

    
    .my_link_color:link { color:#ff0000!important;}
    .my_link_color:visited { color:#ff0000!important;}
    .my_link_color:hover { color: #fff !important;}
    .my_link_color:active { color:#ff0!important;}
    

    I then added the class to the shortcut

    
    [wp_lightbox_prettyPhoto_anchor_text_pdf link="/my_pdf_file.pdf" width="800" height="520" text="Click Here to View" source="" auto_popup="false" class="my_link_color"]
    

    It doesn’t change and keeps the default colors. The class works on a standard link and I can add other style to the text using a different class but I can not change the text color.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Hi, can you share your URL with the video. I would like to check it myself.

    Thank you

    Thread Starter crowesnest

    (@crowesnest)

    Here is the link

    https://wp.manitobaprairiequilters.ca/members/

    There are 2 buttons along the bottom. One is using wp lightbox and one is just a standard link. One changes to the proper color the other does not. Neither are videos both are PDF files but it does the same when I have a video.

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, the button with the following text “text link” is using the following class.

    .mpq_link_color:hover {
        color: #398d6900 !important;
    }

    and

    .mpq_link_color:link {
        color: #ff0000 !important;
    }

    Have you tried editing the above codes?

    Kind regards

    Thread Starter crowesnest

    (@crowesnest)

    I’m not sure where #398d6900 is coming from. mpq_link_color:hover is set to #fff.

    I have changed to different colors which changes the link colors on the button labeled “Test Link” but has no effect on the button labeled “Click Here to View”.

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi,

    but has no effect on the button labeled “Click Here to View”

    The hover color is coming from the following CSS code.

    a:hover {
        color: #682222;
    }
    Thread Starter crowesnest

    (@crowesnest)

    I guess that is the big question, where is it getting that from? Is it a style page for the wp lightbox plugin as it appears to only effect it?

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi,

    I guess that is the big question, where is it getting that from?

    I think it might be coming from your theme. Can you test one of WordPress default themes like Twenty Seventeen? Let me know if this helps you in any way.

    Regards

    Thread Starter crowesnest

    (@crowesnest)

    When I change to Twenty Seventeen I get underlines under the text on the button labeled “Click Here to View” but the color of the text does not change. The other button stays the same.

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, you might have to start from scratch and follow the CSS code I mentioned above. However if you want to keep using your custom style class, then the following CSS code is controlling the text color as I mentioned above.

    but has no effect on the button labeled “Click Here to View”

    The hover color is coming from the following CSS code.

    a:hover {
    color: #682222;
    }

    • This reply was modified 6 years, 7 months ago by mbrsolution.
    Thread Starter crowesnest

    (@crowesnest)

    Okay, let me explain what I am trying to do. I want to change the link color for the anchor text on the WP lightbox shortcode. I created some css code and applied it using a class in the shortcode. That didn’t work. I can apply the same class to another element such as an <a> element and it works. The question that I have is where is the WP Lightbox shortcode picking up the color for the text anchor. Is it getting it from the theme style sheet and if so why can I override it on the <a> element but not on the shortcode.

    • This reply was modified 6 years, 7 months ago by crowesnest.
    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, looking closely at your code I can see the following class. This class does not belong to this plugin.

    lightbox_ultimate_anchor lightbox_ultimate_text_anchor

    Are you using the following plugin?

    Regards

    Thread Starter crowesnest

    (@crowesnest)

    I’m not sure what you are asking? Here is the shortcode that I am using
    [wp_lightbox_prettyPhoto_anchor_text_pdf link="AnnivQuilt-copy.pdf" width="800" height="520" text="Click Here to View" class="mpq-button-lib mpq-link-color" source="" auto_popup="false"]

    Plugin Support mbrsolution

    (@mbrsolution)

    I am sorry but I should have noticed this earlier. The following shortcode does not belong to this plugin.

    
    [wp_lightbox_prettyPhoto_anchor_text_pdf link="AnnivQuilt-copy.pdf" width="800" height="520" text="Click Here to View" class="mpq-button-lib mpq-link-color" source="" auto_popup="false"]

    The following are sample shortcodes this plugin uses.

    For YouTube

    [video_lightbox_youtube video_id=”G7z74BvLWUg&rel=false” width=”640″ height=”480″ anchor=”click me”]

    And for vimeo.

    [video_lightbox_vimeo5 video_id=29417470 width=800 height=450 auto_thumb=”1″]

    Regards

    • This reply was modified 6 years, 7 months ago by mbrsolution.
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Change color of Text Anchor’ is closed to new replies.