« strange error | Limitation of JQUERY’s DOM plugin »
Strange CSS word-wrap stuff
By pavic | May 17, 2006
I wanted to make DIV to act as a text area (to break words and to add scrollbars)
So I have been doing some testing. If You want dinamically to add content to that div, and to break it
You should write css definitions like this:
#userTags {
border:1px;
border-style:solid;
width:50%;
height:40px;
word-wrap:break-word;
text-align: left;
white-space: -moz-pre-wrap;
overflow:auto;
}
So, firefox and IE does not break the line in a same way, IE won’t add white space for You if it’s not   ; and ffox will not break it if it’s   ; and will if its whitespace.
So workaround for this problem is to add both:
.append(str.innerHTML+” ”);
Topics: PHP |
Comments are closed.

