aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes div not wrapping words Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "div not wrapping words" Watch "div not wrapping words" New topic
Author

div not wrapping words

Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 412


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

Joined: Dec 05, 2008
Posts: 5
Use "clear: left" for "content2" div.
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 412
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

Joined: Jan 10, 2002
Posts: 61221
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 412
Thanks Bear! Appreciated very much,

Michele
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: div not wrapping words