How to break a long word in Span? (using Twitter Bootstrap)

I use Twitter upload on my website and I have a range that can contain a long word and I need to break it. I am using this css but not working? what problem?

.fidDivComment { white-space: pre-wrap; display: inline-block; } 

enter image description here

+6
source share
2 answers

You need to add this to your CSS for this range.

 span { -ms-word-break: break-all; word-break: break-all; /* Non standard for webkit */ word-break: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; } 

See this article for an explanation.

+24
source

Questions read:

(using Twitter Bootstrap)

so bootstrap fix: @include hyphens; this bootstrap from the mixin box will add word-wrap: break-word; this mixin exists along this path:

 /bootstrap-sass/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss 
+2
source

Source: https://habr.com/ru/post/947366/


All Articles