Hallo allerseits.
Ich bin nun seit einiger Zeit auf der Suche nach nützlichen Artikeln zu einem Problem aber irgendwie finde ich keine Abhilfe, daher hier meine Fragen, vielleicht hat ja einer von euch damit Erfahrungen:
Ein Kollege hat die Seite http://www.luftwerbung24.de gestaltet und dabei folgendes in einer Layout.php ausgegliedert:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<?php
//Hier wird zugeordnet, welcher Reiter bei welcher Seite aktiv ist!
switch ($site) {
case "index.html":
$aktiv = 1;
break;
case "heissluftballon.html":
$aktiv = 2;
break;
case "heissluftballon-formen-material.html":
$aktiv = 2;
break;
case "heissluftballon-preise.html":
$aktiv = 2;
break;
case "luftschiff.html":
$aktiv = 3;
break;
case "luftschiff-formen-material.html":
$aktiv = 3;
break;
case "luftschiff-preise.html":
$aktiv = 3;
break;
case "bannerflug.html":
$aktiv = 4;
break;
case "display.html":
$aktiv = 5;
break;
case "sonstiges.html":
$aktiv = 6;
break;
case "kontakt.html":
$aktiv = 7;
break;
case "referenzen.html":
$aktiv = 8;
break;
case "impressum.html":
$aktiv = 9;
break;
}
if($site) {
$filename = "sites/".$site;
$handle = fopen ($filename, "r");
$contents = fread ($handle, filesize ($filename));
fclose ($handle);
}
?>
<head>
<meta http-equiv="Content-Language" content="de">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<?php
$inhalt = explode("[TEILBEREICH-TRENNER]",$contents);
echo $inhalt[0];
?>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#F3F7FC" style="margin-bottom:0px;">
<center>
<table style="height: 100%" cellpadding="0" cellspacing="0">
<tr>
<td height="100%" width="17" valign="top">
<table style="height: 100%" cellpadding="0" cellspacing="0">
<tr>
<td style="width:17px; height:21px; background-image: url('gfx/head_02.gif');"></td>
</tr>
<tr>
<td height="100%" width="17" style="background-image: url('gfx/head_11.gif');">
</td>
</tr>
</table>
</td>
<td width="898" valign="top" style="background-color: #fff;">
<table style="width: 100%" cellpadding="0" cellspacing="0">
<tr>
<td width="4" height="17" style="background-image: url('gfx/head_03.gif');"></td>
<td width="889" height="17" style="background-image: url('gfx/head_04.gif');"></td>
<td width="5" height="17" style="background-image: url('gfx/head_07.gif');"></td>
</tr>
</table>[img]gfx/head_10.gif[/img]<table cellpadding="0" cellspacing="0">
<tr>
<td style="background-image: url('gfx/head_<?php if($aktiv == 1) echo "1"; else echo "0"; ?>_15.gif'); cursor: pointer;" width="99" height="25" valign="middle" align="center" onClick="location.href='index.html';"><?php if($aktiv == 1) echo "[b]";?>Startseite<?php if($aktiv == 1) echo "[/b]";?></td>
<td style="background-image: url('gfx/head_<?php if($aktiv == 2) echo "1"; else echo "0"; ?>_16.gif'); cursor: pointer;" width="100" height="25" valign="middle" align="center" onClick="location.href='heissluftballon.html';"><?php if($aktiv == 2) echo "[b]";?>Heißluftballon<?php if($aktiv == 2) echo "[/b]";?></td>
<td style="background-image: url('gfx/head_<?php if($aktiv == 3) echo "1"; else echo "0"; ?>_17.gif'); cursor: pointer;" width="100" height="25" valign="middle" align="center" onClick="location.href='luftschiff.html';"><?php if($aktiv == 3) echo "[b]";?>Luftschiff<?php if($aktiv == 3) echo "[/b]";?></td>
<td style="background-image: url('gfx/head_<?php if($aktiv == 4) echo "1"; else echo "0"; ?>_18.gif'); cursor: pointer;" width="100" height="25" valign="middle" align="center" onClick="location.href='bannerflug.html';"><?php if($aktiv == 4) echo "[b]";?>Bannerflug<?php if($aktiv == 4) echo "[/b]";?></td>
<td style="background-image: url('gfx/head_<?php if($aktiv == 5) echo "1"; else echo "0"; ?>_19.gif'); cursor: pointer;" width="100" height="25" valign="middle" align="center" onClick="location.href='display.html';"><?php if($aktiv == 5) echo "[b]";?>Display<?php if($aktiv == 5) echo "[/b]";?></td>
<td style="background-image: url('gfx/head_<?php if($aktiv == 6) echo "1"; else echo "0"; ?>_20.gif'); cursor: pointer;" width="100" height="25" valign="middle" align="center" onClick="location.href='sonstiges.html';"><?php if($aktiv == 6) echo "[b]";?>Sonstiges<?php if($aktiv == 6) echo "[/b]";?></td>
<td style="background-image: url('gfx/head_<?php if($aktiv == 7) echo "1"; else echo "0"; ?>_21.gif'); cursor: pointer;" width="100" height="25" valign="middle" align="center" onClick="location.href='kontakt.html';"><?php if($aktiv == 7) echo "[b]";?>Kontakt<?php if($aktiv == 7) echo "[/b]";?></td>
<td style="background-image: url('gfx/head_<?php if($aktiv == 8) echo "1"; else echo "0"; ?>_22.gif'); cursor: pointer;" width="100" height="25" valign="middle" align="center" onClick="location.href='referenzen.html';"><?php if($aktiv == 8) echo "[b]";?>Referenzen<?php if($aktiv == 8) echo "[/b]";?></td>
<td style="background-image: url('gfx/head_<?php if($aktiv == 9) echo "1"; else echo "0"; ?>_23.gif'); cursor: pointer;" width="99" height="25" valign="middle" align="center" onClick="location.href='impressum.html';"><?php if($aktiv == 9) echo "[b]";?>Impressum<?php if($aktiv == 9) echo "[/b]";?></td>
</tr>
</table>
<div class="content" style="width:800px; padding-left:20px"><?php
echo $inhalt[1];
if(!file_exists("sites/".$site)){
@include("sites/index.html");
}
?>
</div>
<center>
<div class="footer" style="width:600px;">
</div>
</center>
</td>
<td width="13" valign="top">
<table style="height: 100%" cellpadding="0" cellspacing="0">
<tr>
<td width="13" height="21" style="background-image: url('gfx/head_08.gif');"></td>
</tr>
<tr>
<td width="13" height="100%" style="background-image:
url('gfx/head_12.gif');"></td>
</tr>
</table>
</td>
</tr>
</table> </center>
</body>
</html>
Alles anzeigen
Erstmal gab es gar keine Probleme aber er hatte auch keine Dokumentendeklaration vorgenommen, das habe ich also getan, zunächst mit HTML 4.01 Transitional. Wenn ich den Link zum W3C mit angegeben habe, wurde es wieder falsch dargestellt, dann habe ich einen Artikel gefunden, dass man das weglassen kann und sollte, weil moderne Browser das nicht mehr brauchen.
Nun habe ich das Dokument nach 401 validiert aber festgestellt, dass die Seite im "Quirks Modus" läuft und nicht im "Konform Standard Modus".
Dann würde ich noch gerne zum XHTML Standard 1.0 überwechseln aber solange ich diese Hürde nicht überwunden habe, mache ich da erstmal weiter nichts.
Kann mir bitte jemand aushelfen?
Gruß
Sascha