CSS blank attribute in IE8

I have the following HTML tags (simplified)



some message

The internal Div (validationMsg) is displayed dynamically, and the text message is correctly packaged in FF , It is not longer than the above input field.

But the space attribute is ignored in IE8, and the text will not automatically wrap. I have conducted some experiments in the IE developer tools, and I have converted the blank attribute, When the packaging is applied correctly (but the symbol formatting before and after the input field, we need to disable the packaging)

The code looks a bit confusing, but the framework used is very strict, so I can only add a new one in controlDiv div or paragraph.

It may not be the best solution, but the role of IE is from the parent IS APPLIED to the layout of validationMsg, so it is impossible to set “white-space: normal” by yourself. My solution is to set a wrapper for validationMsg with a style of “width: 100% (or any size to be applied to the validationMsg div ); white-space: normal”, so the layout looks good for IE and other browsers.

This is an example I posted: http://jsbin.com/edeqam/ 1

It looks stable on all browsers.

I have the following HTML markup (simplified)



some message

The internal Div (validationMsg) is displayed dynamically, and the text message is correctly wrapped in FF, and it is not longer than the above input field.

But it is ignored in IE8 If the space attribute is added, the text will not wrap automatically. I have done some experiments in the IE developer tools, and I have converted the blank attribute, when the packaging is applied correctly (but before and after the symbol formatting of the input field, we need to disable the packaging)

The code looks a bit confusing, but the framework used is very strict, so I can only add a new div or paragraph in controlDiv.

It may not be the best solution, but the role of IE is from the parent IS APPLIED to the layout of validationMsg, so it is impossible to set “white-space: normal” by yourself. My solution is to set a wrapper for validationMsg, which The style is “width: 100% (or any size to be applied to the validationMsg div); white-space: normal”, so the layout looks good for IE and other browsers.

This An example I posted: http://jsbin.com/edeqam/1

It looks stable on all browsers.

Leave a Comment

Your email address will not be published.