Overset code block? | WordPress.org

[ad_1]

Hi @jlhblwdsjhbiul, great question. It looks like the test there doesn’t have any block-related markup, specifically this class:

wp-block-code

The sample text is just using pre, which uses the browser default of no-wrap. The sample also uses Lorem. Its long lines might look better formatted as a paragraph than code with all of its manual line breaks might.

If you want to wrap all pre-blocks regardless of class, something like this will work:

pre {
    text-wrap: pretty;
}

Hoping that helps!

@supernovia thanks for the reply. I’m a beginner at this. I switched from visual editor to code editor and could see what you meant when I tried to recreate it on my site.

Appreciate your help, I learned something new today!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer