7
I created a div with a defined width, but when I insert a very large word the text keeps coming out of the div, how to continue to word at the bottom line?
7
I created a div with a defined width, but when I insert a very large word the text keeps coming out of the div, how to continue to word at the bottom line?
10
Use:
word-wrap: break-word;
in that div.
+1 works perfectly in Firefox and Chrome. Could anyone check IE compatibility? I made an example: http://jsfiddle.net/tBNyz/
It worked perfectly in ie7, ie8, ie9, and ie10 :) @utluiz
@Pauloroberto Thanks!
http://caniuse.com/#search=word-wrap. This site is very good for checking compatibility.
0
To solve this I always make use of the property float:
.
For example:
.minhaDiv { float:left; width:200px; }
Every time your text gets close to the size of this div
, she will "break" to the bass line.
It doesn’t work if you have a bigger word than div.
Browser other questions tagged html css
You are not signed in. Login or sign up in order to post.
only and you do not set the height of the div or use the overflow hiden
– user105535