W3C wie soll ich die Fehler lösen?

Status
Nicht offen für weitere Antworten.

crashx

Erfahrenes Mitglied
Beim Validieren ergibt es mir 9 Fehler.

Doch ich weiss leider nicht wie sie zu beheben sind.

http://validator.w3.org/check?uri=http://www.itin.info&charset=(detect+automatically)&doctype=Inline

hier mal der Code der Seite:

HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<?
$fp=fopen("total.txt","r"); 
$count=fgets($fp,1024); 
fclose($fp); 
$fw=fopen("total.txt","w"); 
$cnew=$count+1; 
$countnew=fputs($fw,$count+1); 
fclose($fw); 
?>
<html>

	<head>
		<link rel="stylesheet" type="text/css" href="css/layout.css">
		<link rel="stylesheet" type="text/css" href="css/advanced.css">
		<script language="JavaScript">
		
		switch_a= new Image();
		switch_a.src = "images/me-out.gif"
		switch_b= new Image();
		switch_b.src = "images/me-over.gif"
		
		</script>
		<script language="JavaScript">
		
		function fenster(winname,wintitel,breite,hoehe) {
			var links=screen.width/2-breite/2;
			var oben=screen.height/2-hoehe/2;
			NewWin = window.open(winname, wintitel, "width="+breite+",height="+hoehe+",top="+oben+",left="+links+",toolbar=0,location=0");
			}
			
		</script> 
	</head>
	
	<body>
	
		<center>
		<div id="holder">
			
			<div id="header">		
			</div>
			
			<div id="search">
				
				<div class="switch">
					<img src="images/me-out.gif" name="change" onmouseover="change.src='images/me-over.gif';" onmouseout="change.src='images/me-out.gif'">
				</div>
		
			</div>
			
			<div id="navigation">
				<div class="buttonleft" style="opacity:.4; filter:alpha(opacity=40); -moz-opacity:.4; color: #000000">Lebenslauf</div>
				<div class="button" style="opacity:.4; filter:alpha(opacity=40); -moz-opacity:.4; color: #000000">Diplome</div>
				<div class="button" style="opacity:.4; filter:alpha(opacity=40); -moz-opacity:.4; color: #000000">Arbeitszeugnisse</div>
				<div class="button" style="opacity:.4; filter:alpha(opacity=40); -moz-opacity:.4; color: #000000">Referenzen</div>
				<div class="buttonright" style="opacity:.4; filter:alpha(opacity=40); -moz-opacity:.4; color: #000000">Bewerbungsdossier anfordern</div>
			</div>
			
			<div id="content">
				<? 
				if($_GET['request'] == "benutzer")
					{
						echo "<p>Ihr Benutzername wurde nicht eingegeben oder ist Fehlerhaft</p>";
					}		
				if($_GET['fault'] == "passwort")
					{
						echo "<p>Ihr Passwort ist Fehlerhaft oder wurde nicht eingegeben</p>";
					}
				else
					{
					echo "<p>Herzlich Willkommen</p>";
					}
				?>
				<form action="set.php" method="POST">
					<input type="hidden" name="check" value="1">
					<table id="">
					<tr><td>Benutzername:</td><td><input type="text" name="user" style="width: 100px; font-family: arial; font-size: 9pt"></td></tr>
					<tr><td>Passwort:</td><td><input type="password" name="pass" style="width: 100px; font-family: arial; font-size: 9pt"></td></tr>
					<tr><td></td><td><input type="submit" name="senden" value="Login"></td></tr>
					</table>
				</form>
			</div>
			
			<div id="footer">
				<div class="buttonleft1"><a href="index.php" class="down">Home</a></div>
				<div class="button1"><a href="index-kontakt.php" class="down">Kontakt</a></div>
				<div class="button1" style="opacity:.8; filter:alpha(opacity=80); -moz-opacity:.8; color: #FFFFFF">Sitemap</div>
				<div class="buttonright1" style="opacity:.8; filter:alpha(opacity=80); -moz-opacity:.8; color: #FFFFFF">Impressum</div>			
			</div>

		</div>
		
		</center>
		
	</body>
	
</html>
 
Hallo,
statt
HTML:
<script language="JavaScript"></script>
solltest du besser
HTML:
<script type="text/javascript"></script>
schreiben.

mfg
forsterm
 
die Meldung für das alt-Attribut kannst du entweder ignorieren, oder tust das Attribut halt hinein.

<center> gibts in STRICT nicht, also entweder änderst du den DOCTYPE in Transitional, oder du nimmst das <center> heraus und zentrierst mit CSS.
 
Probier mal Folgendes:
HTML:
<?php

	$fp = fopen('total.txt', 'r+');
	fputs($fp, fgets($fp,1024)+1);
	fclose($fp);

?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title></title>
	<link rel="stylesheet" type="text/css" href="css/layout.css">
	<link rel="stylesheet" type="text/css" href="css/advanced.css">
	<script type="text/JavaScript">
		switch_a= new Image();
		switch_a.src = "images/me-out.gif"
		switch_b= new Image();
		switch_b.src = "images/me-over.gif"

		function fenster(winname,wintitel,breite,hoehe) {
			var links=screen.width/2-breite/2;
			var oben=screen.height/2-hoehe/2;
			NewWin = window.open(winname, wintitel, "width="+breite+",height="+hoehe+",top="+oben+",left="+links+",toolbar=0,location=0");
			}
	</script>
	<style type="text/css">
		#holder {
			text-align: center;
		}
	</style>
</head>
	
<body>
	<div id="holder">

		<div id="header">		
		</div>

		<div id="search">

			<div class="switch"><img src="images/me-out.gif" name="change" onmouseover="change.src='images/me-over.gif';" onmouseout="change.src='images/me-out.gif'" alt=""></div>
		</div>

		<div id="navigation">
			<div class="buttonleft" style="opacity:.4; filter:alpha(opacity=40); -moz-opacity:.4; color: #000000">Lebenslauf</div>
			<div class="button" style="opacity:.4; filter:alpha(opacity=40); -moz-opacity:.4; color: #000000">Diplome</div>
			<div class="button" style="opacity:.4; filter:alpha(opacity=40); -moz-opacity:.4; color: #000000">Arbeitszeugnisse</div>
			<div class="button" style="opacity:.4; filter:alpha(opacity=40); -moz-opacity:.4; color: #000000">Referenzen</div>
			<div class="buttonright" style="opacity:.4; filter:alpha(opacity=40); -moz-opacity:.4; color: #000000">Bewerbungsdossier anfordern</div>
		</div>

		<div id="content">
<?php

	if( isset($_GET['request']) && $_GET['request'] == "benutzer") {
		echo "<p>Ihr Benutzername wurde nicht eingegeben oder ist Fehlerhaft</p>";
	}		
	if( isset($_GET['fault']) && $_GET['fault'] == "passwort" ) {
		echo "<p>Ihr Passwort ist Fehlerhaft oder wurde nicht eingegeben</p>";
	} else {
		echo "<p>Herzlich Willkommen</p>";
	}

?>
			<form action="set.php" method="POST">
				<div><input type="hidden" name="check" value="1"></div>
				<table>
					<tr><td>Benutzername:</td><td><input type="text" name="user" style="width: 100px; font-family: arial; font-size: 9pt"></td></tr>
					<tr><td>Passwort:</td><td><input type="password" name="pass" style="width: 100px; font-family: arial; font-size: 9pt"></td></tr>
					<tr><td></td><td><input type="submit" name="senden" value="Login"></td></tr>
				</table>
			</form>
		</div>

		<div id="footer">
			<div class="buttonleft1"><a href="index.php" class="down">Home</a></div>
			<div class="button1"><a href="index-kontakt.php" class="down">Kontakt</a></div>
			<div class="button1" style="opacity:.8; filter:alpha(opacity=80); -moz-opacity:.8; color: #FFFFFF">Sitemap</div>
			<div class="buttonright1" style="opacity:.8; filter:alpha(opacity=80); -moz-opacity:.8; color: #FFFFFF">Impressum</div>			
		</div>

	</div>
		
</body>
</html>
 
Danke euch,

Doch ein Problem habe ich immer noch:

Die Zentrierung:

Code:
	<style type="text/css">
		#holder {
			text-align: center;
		}
	</style>

Das geht nicht, weder im IE noch in FF, Moz, Opera

Code:
	<style type="text/css">
		body {
			text-align: center;
		}
	</style>

Das geht im IE, jedoch nicht in FF, Moz, Opera

@Gumbo

Danke für die verkürzung im PHP teil :) (habe noch viel zu lernen)
 
Wenn das DIV #holder in der Seite horizontal zentriert sein soll, dann wende neben einer Breitenangabe die margin-Eigenschaft auf das Element an:

Code:
#holder {
width: 700px; 
margin: 0 auto;
}
 
hallo

No Character Encoding Found! Falling back to UTF-8.

nach Titel uteren Code eintragen ist fürs encoding
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">



timeout
 
Status
Nicht offen für weitere Antworten.
Zurück