Page 1 of 1

Formating input text

Posted: Mon May 31, 2004 3:50 pm
by AlbinoJellyfish
Again, I am making my news script. There is a problem. When I input a longer text string or announcement, it stretches out my page.

I want the text to scroll vertically, not horizontally.

Is there a way to format it?

this is what happens:

ImageImage

This is my code:

Code: Select all

<?php
<?PHP 
$db = mysql_connect("not tellin"); 
mysql_select_db("seven" , $db) or die("Couldn't open $db: ".mysql_error()); 
$query = "SELECT * FROM sevennews ORDER BY id DESC"; 
$result=mysql_query($query); 
while ($row = mysql_fetch_array($result)){ 
?>
<table border="0" cellpadding="0" cellspacing="0" width="334" height="1">
          <tr>
<td width="330" height="13" background="bar_dark.gif" valign="top"> 
              <p align="center" style=" margin-top: 0; margin-bottom: 0"><b><font color="#000000"> 
           <? 
echo $row['date']; 
echo ' - '; 
echo $row['description']; 
echo '</font></b></p> 
            </td> 
          </tr> 
          <tr> 
            <td width="330" valign="top"> 
              <p style="text-indent: 20">'; 
echo $row['story']; 
echo  '         </tr> 
          <tr> 
            <td width="330" height="8" valign="middle" align="right"> 
              <p style="text-indent: 0; margin-left: 0; margin-right: 25; margin-top: 0; margin-bottom: 0"><b><font color="FF6600"> Posted By:  '; 
echo $row['author']; 
echo ' </b></font></td> 
          </tr>'; 
} 

?> 
?>

Posted: Mon May 31, 2004 3:55 pm
by feyd
unless you use overflow, or force a physical wrap, I don't know of any other way to combat really long words, since the web wasn't really built for dynamic hyphenation..