Website wordt niet normaal weergegeven

Status
Niet open voor verdere reacties.

geertd

Gebruiker
Lid geworden
16 nov 2008
Berichten
340
Hallo allemaal,

Ik ben nu bezig met een website: www.blue-stream.nl/NEW
Als ik 'm met IE8 open wordt 'ie gewoon normaal weergegeven.
Maar wanneer ik dat met FireFox doe wordt het i-frame in het midden verticaal verkleind.
En wanneer ik 'm met Chrome open wordt het i-frame zelfs helemaal weggelaten.

Hoe kan ik dit oplossen?

Ik heb m'n website trouwens met PHP gemaakt, maar de HTML code is dit:
HTML:
<html>
<head>
<meta http-equiv="Content-Language" content="nl">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Testpagina | Blue-stream.nl</title>
</head>
<body style="overflow: hidden"><body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#358CFF">
<div style="position: absolute; width: 100%; height: 100%; z-index: 1; left: 0px; top: 0px; right: 0; bottom: 0" id="background">
<img border="0" src="background2.png" width="100%" height="100%"></div>
<div style="position: absolute; width: 204px; height: 75px; z-index: 3; top: 2px; right:2px" id="login">
	<form method="POST" action="index.php"><table border="0" width="100%">
		<tr>
			<td><font color="#FF0000" size="1">Gebruikersnaam<br></font>
			<input type="text" name="user" size="20"><br></td>
			<td rowspan="2">
			<input type="submit" value="Inloggen" name="login0" style="float: center"></td>
		</tr>
		<tr>
			<td>
		<font size="1" color="#FF0000">Wachtwoord<br>
		</font><input type="password" name="pass" size="20"></td>
		</tr>
	</table></form></div>
<div style="position: relative; left: 0px; top: 0; width: 100%; height: 100%; z-index: 2; right:0; bottom:0; visibility:visible" id="textframe">
<p align=center>
<table border="0" width="100%" height="100%">
	<tr>
		<td height="21%"></td>
		<td height="21%"></td>
	</tr>
	<tr>
<td width="6%"></td>	
	<td>
			<p align=center><!--<iframe name="I1" width="78%" height="90%" src="" border="0" frameborder="0" align="center">
Your browser does not support inline frames or is currently configured not to display inline frames.-->
<iframe name="I1" width="78%" height="90%" src="band.htm" border="0" frameborder="0" align="center">
Your browser does not support inline frames or is currently configured not to display inline frames.</td>
	</tr>
</table>
</p></div>
</body>
 
</html>

Alvast bedankt,

Geert
 
De tag van het iframe is niet gesloten, deze moet nog gesloten worden voor het sluiten van de <td>
HTML:
<html>
<head>
<meta http-equiv="Content-Language" content="nl">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Testpagina | Blue-stream.nl</title>
</head>
<body style="overflow: hidden"><body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#358CFF">
<div style="position: absolute; width: 100%; height: 100%; z-index: 1; left: 0px; top: 0px; right: 0; bottom: 0" id="background">
<img border="0" src="background2.png" width="100%" height="100%"></div>
<div style="position: absolute; width: 204px; height: 75px; z-index: 3; top: 2px; right:2px" id="login">
    <form method="POST" action="index.php"><table border="0" width="100%">
        <tr>
            <td><font color="#FF0000" size="1">Gebruikersnaam<br></font>
            <input type="text" name="user" size="20"><br></td>
            <td rowspan="2">
            <input type="submit" value="Inloggen" name="login0" style="float: center"></td>
        </tr>
        <tr>
            <td>
        <font size="1" color="#FF0000">Wachtwoord<br>
        </font><input type="password" name="pass" size="20"></td>
        </tr>
    </table></form></div>
<div style="position: relative; left: 0px; top: 0; width: 100%; height: 100%; z-index: 2; right:0; bottom:0; visibility:visible" id="textframe">
<p align=center>
<table border="0" width="100%" height="100%">
    <tr>
        <td height="21%"></td>
        <td height="21%"></td>
    </tr>
    <tr>
<td width="6%"></td>    
    <td>
            <p align=center><!--<iframe name="I1" width="78%" height="90%" src="" border="0" frameborder="0" align="center">
Your browser does not support inline frames or is currently configured not to display inline frames.-->
<iframe name="I1" width="78%" height="90%" src="band.htm" border="0" frameborder="0" align="center">
Your browser does not support inline frames or is currently configured not to display inline frames.</iframe></td>
    </tr>
</table>
</p></div>
</body>
 
</html>
 
Ik heb nu de sluittags voor het i-frame geplaatst, maar hij doet 't nog steeds niet bij Chrome en Firefox.
 
Er zit 'n hele serie zeer zware fouten in de pagina (geen doctype, twee keer 'n body, enz.). Als je 'm door de validator haalt, krijg je 'n lijst van dat soort fouten:
http://validator.w3.org/
Verder maakt het gebruik van inline-css (css binnen de tags) het vrijwel onmogelijk om eventuele fouten te repareren, omdat het de code heel erg onoverzichtelijk maakt.
Veel beter is om de css in 'n extern stylesheet te zetten. Dat maakt ook het onderhoud van de site 'n stuk makkelijker.
 
Nu heb ik dus mbv W3C website validator mijn website verbeterd. Dit is de code die ik nu heb:
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="nl">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Testpagina | Blue-stream.nl</title>
<link rel="stylesheet" type="text/css" href="bckborder.css"><meta name="backgroundborder" content="backgroundborder, default">
</head>
<body style="overflow: hidden" bgcolor="#358CFF">
<!-- topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" -->
<div style="position: absolute; width: 100%; height: 100%; z-index: 1; left: 0px; top: 0px; right: 0; bottom: 0" id="background">
<img border="0" src="background2.png" width="100%" height="100%"></div>
<div style="position: absolute; width: 204px; height: 75px; z-index: 3; top: 2px; right:5px" id="login">
	<form method="POST" action="index.php"><table border="0" width="100%">
		<tr>
			<td><font color="#FF0000" size="1">Gebruikersnaam<br></font>
			<input type="text" name="user" size="20"><br></td>
			<td rowspan="2">
			<input type="submit" value="Inloggen" name="login0" style="float: center"></td>
		</tr>
		<tr>
			<td>
		<font size="1" color="#FF0000">Wachtwoord<br>
		</font><input type="password" name="pass" size="20"></td>
		</tr>
	</table></form></div>
<div style="position: relative; left: 0px; top: 0; width: 100%; height: 100%; z-index: 2; right:0; bottom:0; visibility:visible" id="textframe">
<p align=center>
<table border="0" width="100%" height="100%">
	<tr>
		<td height="21%"></td>
		<td height="21%"></td>
	</tr>
	<tr>
<td width="6%"></td>	
	<td>
			<p align=center><!--<iframe name="I1" width="78%" height="90%" src="" border="0" frameborder="0" align="center">
Your browser does not support inline frames or is currently configured not to display inline frames.-->
<iframe name="I1" width="78%" height="90%" src="band.htm" border="0" frameborder="0" align="center">
Your browser does not support inline frames or is currently configured not to display inline frames.</iframe></td>
	</tr>
</table>
</div>
</body>
 
</html>

Hierin maak ik gebruik van stylesheet bckborder.css:
Code:
body { 
top:0; 
left:0; 
margin:0; 
padding:0; 
}

De validator geeft nu nog 4 fouten weer:

  • Line 12, Column 65: required attribute "ALT" not specified
  • Line 29, Column 39: there is no attribute "HEIGHT"
  • Line 39, Column 66: there is no attribute "BORDER"
  • Line 39, Column 99: value of attribute "ALIGN" cannot be "CENTER"; must be one of "TOP", "MIDDLE", "BOTTOM", "LEFT", "RIGHT"

Weet er iemand hoe ik die errors eruit kan halen?

Alvast bedankt
 
Laatst bewerkt:
Code past niet bij doctype, is ouderwets,
vervangen door een style opmaak.

* Line 12, Column 65: required attribute "ALT" not specified -> hoort bij en plaatje alt="plaatje"
* Line 29, Column 39: there is no attribute "HEIGHT" -> style="height: 40px;"
* Line 39, Column 66: there is no attribute "BORDER"-> style="border: solid 1px #ff0000;"
* Line 39, Column 99: value of attribute "ALIGN" cannot be "CENTER"; must be one of "TOP", "MIDDLE", "BOTTOM", "LEFT", "RIGHT" -> style="text-align: center;"

:cool:
 
Heel erg bedankt Peter!

Mijn site is nu volgens de validator FOUTLOOS! :D

Maar wanneer ik met Google Chrome mijn site open wordt er nog steeds geen frame weergegeven...:confused:

Waar kan dit nu nog aan liggen?
 
Als je aan de <p> waar het iFrame in staat 'n hoogte toevoegt, zie je 'm wel:
HTML:
<p align="center" style="height: 78%;">
Maar ik zie dit niet zo snel 'n goede pagina worden. Het gebruik van tabellen voor lay-out wordt al jaren afgeraden. Divs en zo zijn veel beter.
Wat nog belangrijker is: je gebruikt inline-css: in de tags zelf. Daardoor wordt het, als je pagina nog iets ingewikkelder wordt, feitelijk onmogelijk om fouten nog op te sporen.
Het is nu al moeilijk om uit te zoeken waarom dat iFrame niet wordt weergegeven.
Ik zou je aanraden al je css in de <head> te zetten:
Code:
<style type="text/css">
... hier de css ...
</style>
Je koppelt de css dan via 'n id of class aan het element.
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan