Notifications
Clear all

wpForo 1.x.x [Solved] pre not wrapping text

5 Posts
2 Users
0 Likes
1,394 Views
Posts: 6
Topic starter
(@audiomonk)
Active Member
Joined: 6 years ago

Hi,

Loving what I'm seeing with the forum plugin, great work.

One annoying thing though, I'm adding code (it's a part of my site) using pre tags, and they accept and post the code, but it splits off into a horizontal scroller. I'm trying to get it to just wrap and display down the screen. I've tried editing CSS to break-word on overflow etc, but nothing seems to be working.

See the attached screenshot, what do I need to do to fix this?

4 Replies
Robert
Posts: 10503
Admin
(@robert)
Support Team
Joined: 8 years ago

Thank you @audiomonk,

This is the regular style of codes. it should not be wrapped for reading codes. However, you can use a small CSS code to remove the horizontal scroll. Please navigate to Dashboard > Forums > Settings > Styles admin page, put this CSS code in Custom CSS code textarea, save it, delete all caches and press Ctrl+F5 on forum front:

#wpforo #wpforo-wrap pre {
      white-space: normal;
}

 

Posts: 6
Topic starter
(@audiomonk)
Active Member
Joined: 6 years ago

Thanks very much indeed! worked like a charm thank you. 😎 

Posts: 6
Topic starter
(@audiomonk)
Active Member
Joined: 6 years ago

D'oh ! now it's happening with my main text, it's not wrapping the words to the next line. 

 

Here

From This page

 

Posts: 6
Topic starter
(@audiomonk)
Active Member
Joined: 6 years ago
.wpforo-post-content p {
word-break:normal;
}

Fixed it