yet another html question

paruhd0x

Diamond Member
Apr 2, 2000
3,100
0
0
Well, I'm working on create a control panel for my website so I can make news entries easy to add. My problem is... when I enter too much text that has no spaces the table that is supposed to hold the news is stretching sideways way out of proportion, when what I really want is for it to go onto the next line and keep the table width locked unchanging in width.

Here's a sample of how my control panel is going to work... http://www.paradoxlair.com/php/cp.php enter in some random text then enter maybe 10 lines of text with no spaces into the news body and hit submit, you'll see how the table just stretches instead of the text going onto the next line.

Thanks in advanced :)
 

Imaginer

Diamond Member
Oct 15, 1999
8,076
1
0
You may want to try one of those <pre> </pre> tags when you display your text.

That way it will keep the formatting of the textarea field

(note to change the font, you may want to define your pre tags with a font family style. also make the textarea wrap=hard)
 

paruhd0x

Diamond Member
Apr 2, 2000
3,100
0
0
Originally posted by: Imaginer
You may want to try one of those <pre> </pre> tags when you display your text.

That way it will keep the formatting of the textarea field

(note to change the font, you may want to define your pre tags with a font family style. also make the textarea wrap=hard)


Pre tag doesn't work because it will still stretch it if I too much text with no spaces is entered. Also browsers with mozilla don't apply CSS fonts and text sizes with the pre tag.
 

Imaginer

Diamond Member
Oct 15, 1999
8,076
1
0
then another suggestion, apply your own line breaks before storing it in your tables after a certain number of characters.

If you look around, I think you can find how to insert line breaks in a database data field.