Help - Search - Members - Calendar
Full Version: something like word wrap
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
codin
hello everyone... This is my first post here and I am a beginner in web design. being a newbie, I require some help.
It would be great if I could learn something from the experts...


consider a div element having properties of width and height of 300px with a black 1px border.

I inserted a single paragraph in the above div tag without line breaks or anything.
now as the width of the div box is 300 px, the text which put inside doesnt fit in the width of the box and the box expands width-wise to contain the text..

but, there is space height wise in the box, So I want the text to jump to the next line and fill it and jump to the other line and so on..without the box width increasing or without using the scroll or hidden property on the div element...

In short, I want to do something like notepad word wrap...but inside the div element box..

Darin McGrew
I'm confused. Text content in HTML normally wraps to fit the width of the available area. Why isn't your text content wrapping normally?
pandy
Maybe it isn't a paragraph but more of a long word, i.e. no spaces where the line can wrap.
Frederiek
You might look into Hyphenator at http://code.google.com/p/hyphenator/ .
codin
QUOTE(pandy @ May 12 2012, 01:06 PM) *

Maybe it isn't a paragraph but more of a long word, i.e. no spaces where the line can wrap.


yes you are true...
was just checking out examples... typed some gibbrish not minding to put some spaces in between...
pandy
Problem solved then. Never type gibberish! biggrin.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.