2 replies [Last post]
lezus
Offline
newbie
Canada
Last seen: 4 years 35 weeks ago
Canada
Timezone: GMT-4
Joined: 2011-10-24
Posts: 2
Points: 3

Hey Everyone, This is my first entry. I am having trouble with a wesbite that has overlaying Divs. The problem is that my main body area div won't wrap text. Instead it just overflows. I have validated my HTML and CSS, and everything looks correct. The address is:

http://catchtheinfection.com/byt/

and the stylesheet can be found here:

http://catchtheinfection.com/byt/wp-content/themes/byt/style.css

Any help would be appreciated. Thanks!

-Lee

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 12 hours 51 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9557
Points: 3614

That's a lo-ong word

Give it a thought. Where would you expect the word wrap if you have only one word? Add some spaces, and you'll see the text break at an appropriate white-space.

In css3, there is a new property called overflow-wrap, which replaces word-wrap. Usage:

p {
    overflow-wrap: break-word;
    }

Keep in mind that this module is a draft only and does not have the required browser support (though this property may), and as a draft, is subject to change.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

lezus
Offline
newbie
Canada
Last seen: 4 years 35 weeks ago
Canada
Timezone: GMT-4
Joined: 2011-10-24
Posts: 2
Points: 3

Ohh my god... I am such an

Ohh my god... I am such an idiot haha. Thanks for clearing that up.. I was pulling my hair out on this one. Thank You so much!