something like word wrap |
something like word wrap |
codin |
May 12 2012, 11:17 AM
Post
#1
|
Group: Members Posts: 6 Joined: 12-May 12 Member No.: 17,102 |
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 |
May 12 2012, 01:01 PM
Post
#2
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
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 |
May 12 2012, 01:06 PM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
Maybe it isn't a paragraph but more of a long word, i.e. no spaces where the line can wrap.
|
Frederiek |
May 13 2012, 04:39 AM
Post
#4
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
You might look into Hyphenator at http://code.google.com/p/hyphenator/ .
|
codin |
May 13 2012, 01:37 PM
Post
#5
|
Group: Members Posts: 6 Joined: 12-May 12 Member No.: 17,102 |
|
pandy |
May 13 2012, 02:11 PM
Post
#6
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
Problem solved then. Never type gibberish!
|
Lo-Fi Version | Time is now: 28th March 2024 - 07:19 AM |