Forum Discussion

Quelyn's avatar
Quelyn
Genius
10 years ago

CSS Question: <pre> styling and wrapping

#lia-body .lia-content .lia-message-body pre, 
	.mceContentBody pre, .mce-content-body pre,
	#lia-body .lia-content .lia-panel-tooltip pre
		{ -ms-word-wrap:sWrap; white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre; }

This is the code for pre formatting.  I don't want it to wrap long lines, but instead scroll to the right to read the whole line. 

This works for published TKB's.  But when I look in the MCE editor, it's not working as expected in chrome.  

In Firefox it's working. 

 

Has anyone had any experience with this one? 

  • OlivierS's avatar
    OlivierS
    Lithium Alumni (Retired)

    Quelyn do you have a URL we could see the issue? 

     

    I'm not a CSS guru, so I'm not sure if there is a difference between :

     

    white-space: pre-wrap;

    and

     

    white-space: -pre-wrap;

     

    (the difference is the '-' sign in front of pre-wrap).

     

    Worth having a play with Google Webmaster Tools if no one respond to this thread!

     

    https://developer.mozilla.org/en-US/docs/Web/CSS/white-space

    • Quelyn's avatar
      Quelyn
      Genius

      Thanks for the suggestion!  I've been trying a bunch of options in Google developer tools. 

      I am trying to change the option to "pre" the default in lithium appears to be "pre-wrap". 

      I tried "-pre" and that didn't work either