Maximale Browseroptimierung

Status
Nicht offen für weitere Antworten.

Grunge

Erfahrenes Mitglied
Hallo,

Ich habe ein riesieges Problem.
Ich bin momentan dabei eine Seite zu progammieren. (PHP) ich gebe zu nicht der beste in HTML zu sein, doch das was ich nun hinbekommen habe, finde ich nicht schlecht...
Folgende Probleme habe ich: Wie ihr seht besteht mein Layout aus Tabellen. Diese werden mit Hintergrund bildern gefüllt. Doch es ist alles verzehrt. Unter der Spalte wo man sich einloggt, zieht sich die Hintegrrund GRafik noch lang, wenn ich die Seite im InternetExplorer öfne...Und wenn man dann eingeloggt ist, dann Zieht sich "corner" auch über das ganze Bild. Dieses Problem habe ich nur beim Internet Explorer. Könnt ihr mir sagen, woran jenes liegt !?

Hier der Code:

Code:
<?
session_start();
include "_connect.php";
include "_functions.php";

//Pms:
$pms="SELECT * FROM `pms_eingang` WHERE `empfaenger`='".$_SESSION['ID']."' AND `read`=0";
$r=mysql_query($pms) or die(mysql_error());
$count=mysql_num_rows($r);

if($count==0){
$n_pms="Keine";
}else{
$n_pms=$count;
}

//Gästebuch:
$gb="SELECT * FROM `usr_guestbook` WHERE `nick`='".$_SESSION['ID']."' AND `read`=0";
$r=mysql_query($gb) or die(mysql_error());
$count=mysql_num_rows($r);

if($count==0){
$n_gb="Keine";
}else{
$n_gb=$count;
}

//Online
if(isset($_SESSION['ID'])){
$date=time();
$selecto=mysql_query("SELECT * FROM usr_online WHERE ip='$_SERVER[REMOTE_ADDR]'");
$mengeo=mysql_num_rows($selecto);
$session=$_SESSION['ID'];
if($mengeo < 1){ mysql_query("INSERT INTO usr_online(ip,time,nickname) VALUES('$_SERVER[REMOTE_ADDR]','$date','$session');"); }
else{ mysql_query("UPDATE usr_online SET time='$date' Where ip='$_SERVER[REMOTE_ADDR]' AND nickname='$session'"); }
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Get 2gether - Die neue Generation des Flirten</title>
<LINK href="images/style.css" rel="stylesheet" type="text/css" />
</head>

<body bgcolor="#f9edb8" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<table cellpadding="0" cellspacing="0" width="100%" border="0">
  <tr >
    <td colspan="3" background="images/logo2_bg.jpg" valign="top" height="150px" ><img src="images/logo2.jpg" border="0" /></td>
  </tr>
  <tr>
    <td rowspan="2" background="images/corner.jpg" height="80px" width="313px">&nbsp;</td>
    <td border="0" background="images/bla.jpg" height="40px">&nbsp;</td>
    <td align="right" background="images/bla.jpg" height="40px">
	<?
	if(isset($_SESSION['ID'])) {
	
	echo "<label><span class=\"login\">Willkommen ".$_SESSION['ID'].".  (<a href=\"index.php?section=logout\">Logout</a>)</span></label>";
	}else{
	?>
	
			<form id="form1" name="form1" method="post" action="index.php?section=login">
	  <label><span class="login">User:</span>
	  <input name="username" type="text" id="username" maxlength="25" />
	  </label>
	  <label><span class="login">Passwort:</span>
	  <input name="password" type="password" id="password" maxlength="10" />
	  </label>
	  <label>
	  <input type="submit" name="Submit" value="OK" />
	  </label>
	</form>
	<label><span class="login"><a href="index.php?section=register">Noch nicht registriert? Klick hier</a></span></label> 
	<?
	}
	?>
</td>	 
  </tr>
  <tr>
    <td colspan="2">&nbsp</td>
  </tr>

</table>
<table cellpadding="0" cellspacing="0" width="100%" border="0">
  <tr>
	<td width="200px" background="images/bg.jpg" valign="top"><br /><br />
	
	<table id="navi" class="box" align="center" cellpadding="0" cellspacing="0" width="90%" border="0">
	<tr>
	<td colspan="3" bgcolor="#cc9966" height="20px" class="stil1" align="center">Navigation</td>
	</tr>
	<tr>
	<?
	if(isset($_SESSION['ID'])) {
	?>
	<td onClick="location.href='index.php?section=edit_profile'" style="cursor:hand" height="20px" bgcolor="#ffff99" onMouseOver="this.bgColor='#CC9966'" onMouseOut="this.bgColor='#ffff99'"><i>:: Mein Profil</i></td>
	<?
	}else{
	?>
	<td onClick="location.href='index.php?section=register'" style="cursor:hand" height="20px" bgcolor="#ffff99" onMouseOver="this.bgColor='#CC9966'" onMouseOut="this.bgColor='#ffff99'"><i>:: Registrieren</i></td>
	<?
	}
	?>
	</tr>
		<tr>
	<td height="20px" bgcolor="#ffff99" onMouseOver="this.bgColor='#CC9966'" onMouseOut="this.bgColor='#ffff99'"><i>:: Mein Profil</i></td>
	</tr>
		<tr>
	<td height="20px" bgcolor="#ffff99" onMouseOver="this.bgColor='#CC9966'" onMouseOut="this.bgColor='#ffff99'"><i>:: Mein Profil</i></td>
	</tr>
	</table>
	<br />
	<table class="box" align="center" cellpadding="0" cellspacing="0" width="90%" border="0">
	<tr>
	<td colspan="3" bgcolor="#cc9966" height="20px" class="stil1" align="center">Deine Neuigkeiten</td>
	</tr>
	<tr><td class="stil2" width="1px">&nbsp;</td>
	<td class="stil2"><b>Neue PM's: </b> <? echo "<a href=\"index.php?section=briefkasten&folder=eingang\">".$n_pms."</a>"; ?><br /><b>Neue GB-Einträge: </b><? echo "<a href=\"index.php?section=user_gb&user=".$_SESSION['ID']."&site=1\">".$n_gb."</a>"; ?> </td>
	<td class="stil2" width="1px">&nbsp;</td>
	</tr>
	</table><br />
	<table class="box" align="center" cellpadding="0" cellspacing="0" width="90%" border="0">
	<tr>
	<td colspan="3" height="20px" bgcolor="#cc9966" class="stil1" align="center">Neusten User</td>
	</tr>
	<tr>
    <td class="stil2" width="1px">&nbsp;</td>
	<td class="stil2">
	<?
	$sql="SELECT * FROM usr_statistik ORDER BY dateofreg DESC LIMIT 5";
	$result=mysql_query($sql) or die(mysql_error());
	
	 if(mysql_num_rows($result)) {
        while($row = mysql_fetch_assoc($result)) {
		echo "<a href=\"index.php?section=view_user&user=".$row['nick']."\">".$row['nick']."</a><br>";
		}}
	?>
	</td>
    <td class="stil2" width="1px">&nbsp;</td>
	</tr>
	</table><br />
	<table class="box" align="center" cellpadding="0" cellspacing="0" width="90%" border="0">
	<tr>
	<td colspan="3" height="20px" bgcolor="#cc9966" class="stil1" align="center">Online-Box</td>
	</tr>
	<tr>

    <td class="stil2" width="1px">&nbsp;</td>
	<td class="stil2">
		<?
	$eextra=time()-60; //vor 10 min
	
	/*$eextra=$date-600; //vor 10 min
$useron=mysql_num_rows(mysql_query("SELECT * FROM online_script WHERE time>='$eextra';"));
echo "$useron";
*/
	$sql="SELECT * FROM usr_online WHERE time<='$eextra'";
	$result=mysql_query($sql) or die(mysql_error());

    while($row=mysql_fetch_assoc($result))
	{
	echo "<a href=\"index.php?section=view_user&user=".$row['nickname']."\">".$row['nickname']."</a><br>";
	}
	?>
	</td>
    <td class="stil2" width="1px">&nbsp;</td>
	</tr>
	</table><br />
		<table class="box" align="center" cellpadding="0" cellspacing="0" width="90%" border="0">
	<tr>
	<td colspan="3" bgcolor="#cc9966" height="20px" class="stil1" align="center">Geburtstagskinder</td>
	</tr>
	<tr>
	<td class="stil2" width="1px">&nbsp;</td>
	<td class="stil2">
	<?
	  
      $sql="SELECT
        `nickname`,
        `birthday`,
        YEAR(NOW()) - YEAR(`birthday`) AS `age`
      FROM `usr_profile`
      WHERE (MONTH(NOW()) = MONTH(`birthday`)
          AND DAYOFMONTH(NOW()) = DAYOFMONTH(`birthday`))
        OR (MONTH(DATE_ADD(NOW(),INTERVAL 1 DAY)) = MONTH(`birthday`)
          AND DAYOFMONTH(DATE_ADD(NOW(),INTERVAL 1 DAY)) = DAYOFMONTH(`birthday`))
      ORDER BY MONTH(`birthday`) ASC,
        DAYOFMONTH(`birthday`) ASC,
		`age` ASC,
        `nickname` ASC";
		$result=mysql_query($sql) or die(mysql_error());
	
	while($row=mysql_fetch_assoc($result)){
		 
	echo "<a href=\"index.php?section=view_user&user=".$row['nickname']."\">".$row['nickname']." (".get_age($row['birthday']).")</a> <br>";
	}
	
	?>
	</td>
	<td class="stil2" width="1px">&nbsp;</td>
	</tr>
	</table><br />
		<table class="box" align="center" cellpadding="0" cellspacing="0" width="90%" border="0">
	<tr>
	<td colspan="3" bgcolor="#cc9966" height="20px" class="stil1" align="center">Neuste Partnerprofile</td>
	</tr>
	<tr>
	<td class="stil2" width="1px">&nbsp;</td>
	<td class="stil2">*stacie* & Evil-Ben<br />Tobi & Sebi<br />Fred & <br />Ernie & Bert<br />Dick & Doof</td>
	<td class="stil2" width="1px">&nbsp;</td>
	</tr>
	</table><br />
		<table class="box" align="center" cellpadding="0" cellspacing="0" width="90%" border="0">
	<tr>
	<td colspan="3" bgcolor="#cc9966" height="20px" class="stil1" align="center">Statistiken</td>
	</tr>
	<tr><td class="stil2" width="1px">&nbsp;</td><td class="stil2">Gesendete PM's heute:<br />..... <i>1.045</i><br />Gesendete PM's insgesamt:<br />..... 10.102<br />Registrierte User:<br />..... 1.002.120</td><td class="stil2" width="1px">&nbsp;</td>
	</tr>
	</table></td>
    <td valign="top"><br /><br />
	<?
	  switch($_GET['section']) {
	   case "edit_profile":
	       include "usr_profile.php";
		   break;
        case "register":
            include "register.php";
            break;
		case "view_user":
		 	include "usr_profile_view.php";
			break;
		case "block_user":
			include "block_user.php";
			break;
		case "send_pms":
			include "send_pms.php";
			break;
		case "error":
		    include "error_msg.php";
			break;
		case "successfull_reg";
			include "successfull_reg.php";
			break;
		case "view_gal":
			include "user_galerie.php";
			break;
		case "activated":
			include "act_msg.php";
			break;
		case "impressum":
			include "impressum.php";
			break;
		case "briefkasten";
			include "usr_pms.php";
			break;
		case "add_friend";
			include "add_friend.php";
			break;
		case "answer_pm":
			include "answer_pms.php";
			break;
		case "read_pm":
			include "read_pm.php";
			break;
		case "user_gb":
			include "usr_gb.php";
			break;
		case "login":
			$sql="SELECT * FROM usr_profile WHERE nickname='".$_REQUEST['username']."' AND passwort='".MD5($_REQUEST['password'])."'";
           $result=mysql_query($sql) or die(mysql_error());

if(mysql_num_rows($result)) {
$row=mysql_fetch_assoc($result);
	if(($row['actcode']==0) AND ($row['activated']==1)){
 $_SESSION['ID'] = $row['nickname'];
echo "<meta http-equiv=\"refresh\" content=\"0; url=index.php?section=\">";
    }else{
echo "Dieser Account ist noch nicht aktiviert worden.";
}
}else{
echo "Passwort oder Benutzername passen nicht zusammen oder sind nicht vorhanden! Bitte überprüfe deine Eingaben!";
}
break;
case "logout":
session_destroy();
//online eintrag löschen
//$sql="DELETE FROM usr_online WHERE nickname='".$_SESSION['ID']."'";
//$result=mysql_query($sql) or die(mysql_error());
echo "<meta http-equiv=\"refresh\" content=\"0; url=index.php?section=\">";
break;

		
        default:  // Wenn eine ungültige Section angegeben wurde
                  // sollen die News gezeigt werden
      
	?>
	<table class="box" align="center" cellpadding="0" cellspacing="0" width="95%" border="0">
		<tr>
		<td class="box" width="1px">&nbsp;</td>
	    <td  height="20px" class="stil1" align="left">Willkommen Evil-Ben</td>
	    <td class="box" width="1px">&nbsp;</td>
		</tr>
	<tr>
	<td class="stil2" width="1px">&nbsp;</td>
	<td height="100%" bgcolor="#ffff99" class="stil2"><br />Hallo.....<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></td>
	<td class="stil2" width="1px">&nbsp;</td>
	</tr>
	</table>
	<?
	break;
	}
	?>
	</td>
  </tr>
  
</table>
</body>
</html>
 
Hi,

kannst du die Seite mal online zur Verfügung stellen, damit man sich ein Bild von der Situation machen kann?

Beim Überfliegen des Quellcodes ist mir schon mal aufgefallen, dass in den HTML-Attributen width,height keine Einheit (px) angegeben wird.
 
HTML:
 <tr>
    <td rowspan="2" background="images/corner.jpg" height="80px" width="313px">&nbsp;</td>
    <td border="0" background="images/bla.jpg" height="40px">&nbsp;</td>
    <td align="right" background="images/bla.jpg" height="40px">

wo fehlen da die einheiten ?
 
Und nochmal zum Mitschreiben: in den HTML-Attributen width,height werden keine Einheiten angegeben.

Aus:

Code:
<td colspan="3" background="/images/logo2_bg.jpg" valign="top" height="150px">
wird:

Code:
<td colspan="3" background="/images/logo2_bg.jpg" valign="top" height="150">
 
Status
Nicht offen für weitere Antworten.
Zurück