Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

div not wrapping words  RSS feed

 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


the above referenced code is not wrapping in the div content 2.

This is with HTML 5.0.

Also I have tried this:

white-space: pre-wrap; /* CSS3 */
white-space: -moz-pre-wrap; /* Firefox */
white-space: -pre-wrap; /* Opera <7 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* IE */



Thanks,
Michele
 
Chetan Charadva
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use "clear: left" for "content2" div.
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks I got rid of the floats and this did the same thing.

Thanks anyway for your advice, it is appreciated.

Thanks, Michele
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65890
135
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It wraps fine for me when I drop that fragment into an HTML page. There must be something else applying styles to the element. I suggest loading the page into Chrome (or Forefox with Firebug) and open the dev tools to inspect the computed CSS that is applied to the element.

P.S. Applying lots of styles with the style attribute is not recommended. You should be applying those styles though a stylesheet.
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear! Appreciated very much,

Michele
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!