📜 ⬆️ ⬇️

Can plain text mute IE?

Anyone who has had to develop websites knows about browser errors.

However, until today, I thought that it was necessary to at least use cunning CSS constructs, nested hierarchies of DIVs and tables, all sorts of floats and collapsing margins to make a real mistake.

I was sure that there is at least one situation where you can not be afraid of any ambushes and jokes: we can always wrap a fragment of plain text with an ordinary DIV (display: block; and float: none;) and be sure that our text will remain inside it:
')
<Div>
This text will never go beyond the usual DIV!
</ Div>
But in reality there are no limits in this cruel world of browser insanity:

In IE 9, the text can go beyond the limits of the DIV, if it contains a bullet character (*) not separated from the subsequent text by a space ...

Further, a simple test - if you open this post in IE9, then, most likely, instead of several lines with the word “• test” repeated many times, you will see one line - since this seemingly plain text broke the DIV border in the Habr layout ... Check:

• test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test • test

PS Thanks to the guess of deenamo about the reason for this error in IE, I found a way to get around this glitch - you need to replace the sequence with the space + & bull; on the space + & zwsp; & bull; or on the space + & zwnj; & bull; But you need to be careful with this replacement for any old browsers that may not understand the zwsp / zwnj symbols.

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


All Articles