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:

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:

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
Post a Comment