RE: [PHP] text wrap in table

From: Date: Fri, 24 Aug 2001 08:47:19 +0000
Subject: RE: [PHP] text wrap in table
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-64222@lists.php.net to get a copy of this message
Have you tried using the <nobr> tag along with the <pre> tag? The <nobr> tag will not allow the text to wrap. You can use it outside the <pre> tags and see what you come up with. It sounds simple, but it may provide you with the solution that you need. Navid -----Original Message----- From: Adrian D'Costa [mailto:adrian@pcsadvt.com] Sent: Thursday, August 23, 2001 11:36 PM To: php general list Subject: [PHP] text wrap in table Hi, I am creating a program for a newspaper to publish their article online. There is a form what allows them to cut and past from their editors (word, pagemaker, staroffice). The data is being entered correctly. The problem is when I try and get the data from the table the whole matter scrolls off the screen. I need it to be formatted as the client cut and pastes it (headings, paras, etc). Below is my table and part of my program. mysql> desc newsarticles; +----------+--------------+------+-----+------------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+--------------+------+-----+------------+----------------+ | id | int(5) | | PRI | NULL | auto_increment | | nid | int(5) | | MUL | 0 | | | headline | varchar(100) | | | | | | article | mediumtext | | | | | | date | date | | | 0000-00-00 | | | imgpath | varchar(200) | YES | | NULL | | +----------+--------------+------+-----+------------+----------------+ <html> <head> <title><? echo $row->headline; ?></title> </head> <body bgcolor="white"> <h1 align="center"><? echo $row->headline; ?></h1> <h3 align="center"><? echo $row->description; ?></h3> <table width="600" border="1"> <tr> <td valign="top" width="70%"><font face="Arial" size="2" color="blue"><strong><? echo $sd ."-". $sm ."-". $sy; ?></strong><br><pre><? echo $row->article; ?></pre></font></td> <td valign="top" width="30%"><img src="<? echo $row->imgpath; ?>" <? echo $iwh[3]; ?> ></td> </tr> </table> </body> </html> I use the <pre></pre> to display with the line breaks. If I take of the <pre> it does not wrap but does not give the breaks. To my thinking maybe while entering the data we should give break the lines physically. This is part of my entry form. <tr> <td><font face="Arial" size="2">HeadLine</font></td> <td><input type="text" name="headline" size="30"> </tr> <tr> <td><font face="Arial" size="2">Article</font></td> <td><textarea name="article" cols="60" rows="10"></textarea></td> </tr> <tr> <td><font face="Arial" size="2">Upload Image</font></td> <td><input type="file" name="userfile" size="30" wrap=ON></td> </tr> <tr align="center"> <td colspan="2"><input type="submit" value="Submit"></td> </tr> How do I get the text not to wrap and to preserve the formatting given by the client. Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#64222) next »