How to wrap text within a code block without overflowing it

prakasit khuansuwan m3JQf T9hU unsplash scaled
Genx Avatar
Share This:

To wrap the text in a code block to fit the screen width, enter the following in CSS.

.wp-block-code code {
white-space: pre-wrap;
overflow-wrap: anywhere;
}

Related Posts


Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

four − 3 =

Webmention: Have you posted a response to this article? Let me know the URL: