• Resolved eliant

    (@eliant)


    Whether the user meets the content_control criteria or not, the message displayed is wrapped in a <DIV> statement. Since <DIV> is a block, the displayed text starts on a new line and ends with a new line.

    If your “Controlled” text is intended to display in-line, this won’t do. As a work-around I modified the plug-in like this:

    Edit classes/Shortcodes.php, lines 50 & 53. Change DIV to SPAN.

    This is not a permanent solution since an update will over-write this modification.

    I welcome comments on a better solution.

    • This topic was modified 4 years, 5 months ago by eliant.
    • This topic was modified 4 years, 5 months ago by eliant.
    • This topic was modified 4 years, 5 months ago by eliant.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support mark l chaves

    (@mlchaves)

    Hey @eliant,

    Thanks for posting. What you can do instead of modifying core plugin code is use CSS to change the style (instead of the markup).

    For example, the code below changes the Content Control denial message div from a block to an inline layout (inline behaves like a span).

    
    .jp-cc.jp-cc-not-accessible {
        display: inline;
    }
    
    

    Learn more about CSS here:

    What is CSS: https://docs.wppopupmaker.com/article/484-popup-maker-glossary-of-terms#css

    Getting Started with Custom CSS: https://docs.wppopupmaker.com/article/287-getting-started-with-custom-css

    • This reply was modified 4 years, 5 months ago by mark l chaves. Reason: Typo
    Thread Starter eliant

    (@eliant)

    Did that. Because CC inserts a <DIV> in-line with the preceding text, WP engine inserts a </P> just in front of the CC <DIV>. So even though I force the DIV to display in-line the browser puts a new-line where the </P> is. The result is almost the same as without the CSS.

    However, when the DIV is replaced with a SPAN, the editor does not inject a </P>

    • This reply was modified 4 years, 5 months ago by eliant.
    • This reply was modified 4 years, 5 months ago by eliant.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘place message in SPAN vs. DIV’ is closed to new replies.