WordPress.org

Ready to get started?Download WordPress

Forums

Captcha
[resolved] Remove linebreaks if Label is empty; Add tags around captcha task (4 posts)

  1. webmaster128
    Member
    Posted 4 months ago #

    Dear Captcha-Team,

    in order to properly style the Captcha row in my comment form, I had to adjust the HTML a bit (stuff I couldn't do in my theme).

    You might want to have a look and hopefully use it for later releases:
    http://pastebin.com/Y4fssUDB

    Cheers,

    Simon

    https://wordpress.org/plugins/captcha/

  2. bestwebsoft
    Member
    Plugin Author

    Posted 4 months ago #

    Hi Simon,

    Unfortunately, you haven't described the peculiarities of this change, it is possible, that the necessary css can be written without adding <span class="cptch_task"> and the situation with adding echo '
    '; in the if condition.
    Please provide a link to the example, so that we could estimate the necessity of implementing these changes.

    Sincerely,
    BestWebSoft Support Team

  3. webmaster128
    Member
    Posted 3 months ago #

    Hi BestWebSoft Support Team,

    sure, here you go:

    1. Adding class "cptch_task"

    In our case (https://kullo.net/blog/how-we-benefited-from-the-cebit-2014/) I had to do relative positioning between the label and the Captcha task to fit in the style of the theme (derived from Twenty Eleven).

    There might be other situations, where you want to be able to optionally access the Captcha task from CSS, like changing fonts.

    2. Move br into the if-block

    In case no Label-Text is set, there is no reason to follow <p class="cptch_block"> with a linebreak, e.g. <p class="cptch_block"><br />nine+9. This adds whitespace, that can not be removed via CSS.

    Hope that helps!

    Cheers,

    Simon

  4. bestwebsoft
    Member
    Plugin Author

    Posted 3 months ago #

    Hi Simon,

    1) the styles without <span class="cptch_task">
    .cptch_block label {
    float: left;
    margin-bottom: 2px;
    margin-right: 20px !important;
    }
    .cptch_block {
    line-height: 38px;
    }
    2) the styles for br
    .cptch_block br {
    line-height: 0;
    }

    Apologies, but currently we do not think it necessary to make any changes in the existing tags and there are enough classes to write the necessary styles.

    Sincerely,
    BestWebSoft Support Team

Reply

You must log in to post.

About this Plugin

About this Topic

Tags