Neo
Neo

Reputation: 63

WordPress Word Wrap and Line Break Problem

I am using WordPress 4.9.10 and same theme for 2 different sites. However, one site is having line-break and word-wrap problems.

It keeps wrapping a line in random position. It mostly breaks a new line at hyphen(-), but not ALL hyphen will create a line break.

The same line break problem will happen in both editor (WPBakery) and web page.

I wondered if this is caused by CSS word-wrap. I have forced <body> <p> <div> as word-wrap: normal !important, but same problem still persists.

Here is a sample of the displayed text:

Curabitur neque lorem, congue in urna sed, porta lobortis leo. Morbi hendrerit viverra nibh. Cras ac malesuada-
diam. Nullam in purus consequat, ultricies quam quis, imperdiet tortor. Aliquam justo sem, elementum et elit congue, molestie
ullamcorper lacus. Phasellus malesuada tincidunt-
leo. Morbi mauris-lorem, dapibus vitae tellus ut, interdum gravida massa.

Vivamus pharetra tincidunt ex, et
porttitor tellus luctus at. Fusce et hendrerit dolor, a tempor eros. Vestibulum nec ante enim.

I cannot see the pattern of how it breaks the line. Not all hyphens cause new lines.

Would this be caused by CSS or Wordpress?

Thank you very much in advance.

Upvotes: 1

Views: 2180

Answers (1)

Neo
Neo

Reputation: 63

I fixed the problem by upgrading WPBakery plugin.

Then, created a new post and copied the source code from the original post.

Problem fixed instantly by copying the HTML source code. Maybe the old WPBakery backend mode had messed up the source, and the new WPBakery had fixed some tags while copying the source text over.

Seems that there is nothing to do with CSS.

Upvotes: 1

Related Questions