CSS to fix long lines of text with no spaces that push columns to the right

I have a table with a 45% width column on the left and a 55% width column on the right.

When a user types in "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM" for testing, it pushes the first column into the space designated for the right column and runs it off the page, so now I have to fix it.

Even this website breaks it nicely and still allows a dynamic width. But I don't know how they did that.

I have tried adding this style to it to fix it, but it doesn't work:
.LongLineWrap {
   white-space: pre-wrap;      /* CSS3 */  
   white-space: -moz-pre-wrap; /* Firefox */    
   white-space: -pre-wrap;     /* Opera <7 */  
   white-space: -o-pre-wrap;   /* Opera 7 */    
   word-wrap: break-word;      /* IE */
}

I believe someone said they had to have a fixed width left panel.

Is there a fix for this? So it doesn't break the look and feel, other than telling people not to do that?

thanks!
LVL 2
Starr DuskkASP.NET VB.NET DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
I think what you are looking for is "overflow: hidden;" .   https://www.w3schools.com/cssref/pr_pos_overflow.asp
0
Snarf0001Commented:
I think you want a combination of word-wrap and break-word:
word-break:break-word; 
word-wrap:break-word;

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Starr DuskkASP.NET VB.NET DeveloperAuthor Commented:
thanks! that fixed it!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.