• nenontwerp

    (@nenontwerp)


    Hi,
    Why is the code wrapped in an empty div element (no attributes) ? In my theme by default a div has a max-width. If there is no className, I cant modify it.

    Hope to here. Thanks.
    Martin

Viewing 3 replies - 1 through 3 (of 3 total)
  • Dan Roundhill

    (@mrroundhill)

    Hi, can you share an example where this div wrapper is being used? Maybe you can target it as a child of a parent class?

    Thread Starter nenontwerp

    (@nenontwerp)

    Gutenberg block admin add:

    function test()
    {
        //
    }

    Database:

    <!-- wp:syntaxhighlighter/code {"language":"php","lineNumbers":true} -->
    <pre class="wp-block-syntaxhighlighter-code">function test()
    {
        //
    }</pre>
    <!-- /wp:syntaxhighlighter/code -->

    Html front:

    <div class="entry-content">
    <p>Any blocks before</p>
    <div><div id="highlighter_933185" class="syntaxhighlighter alignwide php"><div class="toolbar"><span><a href="#" class="toolbar_item command_help help">?</a></span></div><table border="0" cellpadding="0" cellspacing="0"><tbody></tbody></table></div></div>
    <p></p>
    <p>Any blocks after</p>
    </div>

    ALso check out syntaxhighlighter-html of any page by contributor Alex Mills:
    https://alex.blog/wordpress-plugins/syntaxhighlighter/adding-a-new-brush-language/

    Dan Roundhill

    (@mrroundhill)

    I see. Seems weird that your theme is assigning a max-width to all div tags, though. Could you tweak that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wrapped in an empty div’ is closed to new replies.