html - Prevent automatic line breaks in a <code> tag -


i have html code tag, wrapped in in pre tag fixed width , getting ugly automatic line breaks:

ugly line breaks!

what want achieve is, text not automatically broken on spaces, when add white-space: nowrap code element, whole thing collapses single line, \n , \r characters ignored well:

single line

does have idea how prevent automatic line breaks, keep intended line breaks?

the problem caused twitter bootstrap. whatever reason, added following styles code tag:

white-space:pre; white-space:pre-wrap; word-break:break-all; word-wrap:break-word; 

by overwriting styles with:

white-space: pre; word-break: normal; word-wrap: normal; 

the problem fixed.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -