It has come to my attention that in Microsoft Edge there is a problem with some css attributes, such as :
word-break: break-word;
Is there a way of fixing this or is there a way around this?
For English and many other languages, the correct breaking means hyphenation, with a hyphen added at the end of a line when a break occurs. In CSS, you can use hyphens: auto , though you mostly still need to duplicate it using vendor prefixes.
CSS min/max-width/height is Fully Supported on Microsoft Edge 17.
A line-break can be added in HTML, using only CSS, by employing the pseudo-class ::after or ::before . In the stylesheet, we use these pseudo-classes, with the HTML class or id, before or after the place where we want to insert a line-break. In myClass::after : Set the content property to "\a" (the new-line character).
word-break: break-word is deprecated, and not supported by MS Edge or MS IE. See mozilla documentation about this. word-break is supported by MS Edge and MS IE Here is a list of supported browsers.
word-break is supported by MS Edge and MS IE Here is a list of supported browsers. Alternatively mozilla documentation specifies that overflow-wrap: break-word; acts the way that you want word-break: break-word to function. Show activity on this post.
An alternative solution is to make use of the word-wrap property which IMHO behaves more 'intelligently' - meaning the word break will only be applied when the word is too long to fit into a line width, and won't be applied to words that can simply be moved in whole to the next line.
However, when I view the css on Edge web developer tool, it hasn't changed. I REALLY like Edge as my new preferred browser, but if I can't see the css changes on my fantasy football sites, I'll have to use another.
word-break: break-word
is deprecated, and not supported by MS Edge or MS IE. See mozilla documentation about this.
word-break
is supported by MS Edge and MS IE Here is a list of supported browsers.
Valid MS Edge and MS IE word-break
properties are:
word-break: normal|break-all|keep-all|initial|inherit|unset;
Alternatively mozilla documentation specifies that overflow-wrap: break-word;
acts the way that you want word-break: break-word
to function.
An alternative solution is to make use of the word-wrap
property which IMHO behaves more 'intelligently' - meaning the word break will only be applied when the word is too long to fit into a line width, and won't be applied to words that can simply be moved in whole to the next line.
CSS:
word-wrap: break-word;
The word-wrap
property is supported by most browsers and as of today I can certainly confirm it works in Microsoft Edge, IE11, Chrome, Firefox, Opera and Safari.
Note, word-wrap
has now been renamed to overflow-wrap
, with word-wrap
now being an alternative name for that property, however overflow-wrap
is not understood by Microsoft Edge so stick with using word-wrap
for cross-browser compatability.
The thing is that you have to provide width for container/text in order to use word-break: break-word
property. The only way to avoid this is to use unofficial WebKit/Blink only word-wrap: break-word
property: https://caniuse.com/#search=word-break
It's also worth mentioning, that while word-break: break-word;
is improper property , it's undocumented and non-standard property value in WebKit. This makes the word wrapping behave like word-wrap: break-word
, but works with dynamic widths.
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