• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

div not wrapping words

 
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use "clear: left" for "content2" div.
 
Michele Smith
Ranch Hand
Posts: 421
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bear! Appreciated very much,

Michele
 
reply
    Bookmark Topic Watch Topic
  • New Topic