I'm using Twitter bootstrap in my site and I'm having span which may contain long word and I need to break it. I use this Css but not working? what's problem?
.fidDivComment {
white-space: pre-wrap;
display: inline-block;
}
You need to add this to your CSS for that span
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.
The questions stated this:
(using Twitter Bootstrap)
so the bootstrap fix is this: @include hyphens;
this bootstrap out of the box mixin will add word-wrap: break-word;
this mixin is exist under this path:
/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With