Gregor: Zeilenumbruch

Beitrag lesen

Hallo, ich hoffe, dass jemand von euch mir bei meinem Problem helfen kann. Zuvor muss ich jedoch gestehen, dass ich noch nichts mit php zu tun hatte.

Also, der Code sind so aus: <?  $pagenr=4;  $pagetitel="Concorno";

if (isset($_COOKIE["language"]))  {  $lang=$_COOKIE["language"];  } else {  $lang="de";  }

require ("../protected/inc/dbcon.inc.php4");   if (!isset($lang)) $lang="de";  $heute=date("Y-m-d");  $sql="select * from con_newsticker where status=1 order by odatum DESC,id DESC";  $result=mysql_query($sql,$conID);  mysql_close();  while ($row=mysql_fetch_array($result))  {  $odatum_help=$row["odatum"];  $id[]=$row["id"];  $related_help=$row["related"];

if ($related_help!="")  {   $link[]=$related_help;   $linktext[]=$row["linktext"];   $linkflag[]=1;   $target[]="_blank";

}

if ($lang=="de") {  $odatum[]=substr($odatum_help,8,2).".".substr($odatum_help,5,2).".".substr($odatum_help,0,4);  $headline[]=$row["headline_de"];  $subline[]=$row["subline_de"];  $meldung[]=$row["text_de"];  } else {  $odatum[]=$odatum_help;  $headline[]=$row["headline_com"];  $subline[]=$row["subline_com"];  $meldung[]=$row["text_com"];  }  }

if ($lang=="de") {  $screentexte=array("drucken");  } else {  $screentexte=array("print");  }

?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title><?=$pagetitel;?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="styles/basic.css" rel="stylesheet" type="text/css"> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_findObj(n, d) { //v4.01   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);   if(!x && d.getElementById) x=d.getElementById(n); return x; }

function MM_validateForm() { //v4.0   var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;   for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);     if (val) { nm=val.name; if ((val=val.value)!="") {       if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');         if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';       } else if (test!='R') { num = parseFloat(val);         if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';         if (test.indexOf('inRange') != -1) { p=test.indexOf(':');           min=test.substring(8,p); max=test.substring(p+1);           if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';     } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }   } if (errors) alert('The following error(s) occurred:\n'+errors);   document.MM_returnValue = (errors == ''); } //--> </script> </head> <body bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#000000" alink="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">   <tr>     <td><table width="750" height="525" border="0" align="center" cellpadding="10" cellspacing="0" class="rahmenhell">       <tr>         <td width="174" height="44" valign="top" bgcolor="#F2F2F2"><img src="images/site/logo.gif" width="174" height="44" class="rahmen"></td>         <td width="596" height="44" valign="top"><table width="546" height="46" border="0" cellpadding="0" cellspacing="0" class="rahmen">           <tr>             <td align="center" valign="middle"><img src="images/bildleisten/home.jpg" width="540" height="40"></td>           </tr>         </table>         </td>       </tr>       <tr>         <td height="20" valign="top" bgcolor="#F2F2F2"><img src="images/header/menu.gif" width="126" height="20" class="rahmen"></td>         <td width="596" height="20" valign="top"><img src="images/header/aktuelles<? if ($lang!="de") echo "_en";?>.gif" width="544" height="20" class="rahmen"></td>       </tr>       <tr>         <td valign="top" bgcolor="#F2F2F2"><? include ("nav/nav.php4"); ?>         </td>         <td width="596" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">           <tr>             <td class="textrot"><strong><? if ($lang=="de") { echo "Aktuelles auf einen Blick"; } else { echo "News"; } ?></strong></td>           </tr>           <tr>             <td class="textrot"><img src="images/site/line.gif" width="546" height="1" hspace="0" vspace="10"></td>           </tr>         </table>           <br>           <div id="cont" style="position:absolute; width:546; height:295; z-index:1; overflow: auto; scrollbar-face-color: white; scrollbar-highlight-color: white; scrollbar-shadow-color: white; scrollbar-3dlight-color: #D6D6D6; scrollbar-arrow-color: #8C0103; scrollbar-track-color: white; scrollbar-darkshadow-color: #D6D6D6);">                           <table border="0" width="95%" align="left">                 <tr>                   <td class="text"><? for ($i=0;$i<count($id);$i++) { ?><?=$odatum[$i];?>                     <br><strong><?=$headline[$i];?>                     :                     <?=$subline[$i];?></strong>                     <br>                     <?=$meldung[$i];?>                     <br>                      [<a href="news_print.php4?id=<?=$id[$i];?>" target="_blank"><?=$screentexte[0];?></a>]<br>                     <br><? } ?></td>                   </tr>               </table></div></td>       </tr>       <tr>         <td height="13" valign="top" bgcolor="#F2F2F2"><table width="100%" border="0" cellspacing="0" cellpadding="0">           <tr>             <td height="7" valign="top"><img src="images/site/line.gif" width="174" height="1"></td>           </tr>           <tr>             <td height="15" valign="middle"><a href="language.php4?lang=de&ref=news.php4"><img src="images/site/flag_de.gif" width="25" height="13" border="0"></a><a href="language.php4?lang=com&ref=news.php4"><img src="images/site/flag_en.gif" width="25" height="13" hspace="15" border="0"></a></td>           </tr>         </table> </td>         <td width="596" height="13" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">           <tr>             <td height="8" valign="top"><img src="images/site/line.gif" width="546" height="1"></td>           </tr>           <tr>             <td height="15"><img src="images/site/blank.gif" width="100" height="13"></td>           </tr>         </table>         </td>       </tr>     </table></td>   </tr> </table> </body> </html>

Die Seite könnt ihr unter: http://www.concorno.de/news.php4 anschauen. Sieht ziemlich blöd aus, da ich irgendwie keine Zeilenumbrüche machen kann... Für einen Tip wäre ich euch sehr dankbar. Die Seite wird immer per Internetbrowser auf den neuesten Stand gebracht. Dort (im Hintergrund) sieht der Text immer gut aus, doch auf der Seite (s.o.) kommt alles nur aneinander gereiht.

Grüße, Gregor