Title: Overset code block?
Last modified: October 2, 2023

---

# Overset code block?

 *  Resolved [jlhblwdsjhbiul](https://wordpress.org/support/users/jlhblwdsjhbiul/)
 * (@jlhblwdsjhbiul)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/overset-code-block/)
 * Tested on Chrome Version 117.0.5938.92 and Safari Version 17.0 (19616.1.27.211.1)
 * On the “Elements” page of the Course theme demo site.
 * [https://wp-themes.com/course/?p=36](https://wp-themes.com/course/?p=36)
 * In the section “Misc Stuff” (near the bottom) there is the code/monospace block.
   This overruns the main area width extending to the sidebar and beyond to the 
   edge of the screen.
 * Is this intentional? Other themes also have this behaviour. I have also seen 
   a slider in a contained box to limit the text to the main column, and allow sideways
   scrolling. An example of this method is in the Coursemax theme.
 * [https://wp-themes.com/coursemax/?p=36](https://wp-themes.com/coursemax/?p=36)
 * Thanks,
 * Ed
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Foverset-code-block%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Velda](https://wordpress.org/support/users/supernovia/)
 * (@supernovia)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/overset-code-block/#post-17094594)
 * Hi [@jlhblwdsjhbiul](https://wordpress.org/support/users/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:
 *     ```wp-block-code
       pre {
           text-wrap: pretty;
       }
       ```
   
 * Hoping that helps!
 *  Thread Starter [jlhblwdsjhbiul](https://wordpress.org/support/users/jlhblwdsjhbiul/)
 * (@jlhblwdsjhbiul)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/overset-code-block/#post-17094621)
 * [@supernovia](https://wordpress.org/support/users/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!
 *  [Velda](https://wordpress.org/support/users/supernovia/)
 * (@supernovia)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/overset-code-block/#post-17097571)
 * Cheers [@jlhblwdsjhbiul](https://wordpress.org/support/users/jlhblwdsjhbiul/)!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Overset code block?’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/course/1.3.9/screenshot.png)
 * Course
 * [Support Threads](https://wordpress.org/support/theme/course/)
 * [Active Topics](https://wordpress.org/support/theme/course/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/course/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/course/reviews/)

## Tags

 * [pre](https://wordpress.org/support/topic-tag/pre/)

 * 3 replies
 * 2 participants
 * Last reply from: [Velda](https://wordpress.org/support/users/supernovia/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/overset-code-block/#post-17097571)
 * Status: resolved