Hej,

Ik had erest me site in css met tabellen en dat werkte perfect alleen in IE werkte de site niet.. dus ik dacht zet het in divjesmaar nu als ik index openen in dreamweaver kan ik niet meer tiepen.. dan komt alles boven de plaatjes wat is er verkeerd?

CSS

@charset "utf-8";
/* CSS Document */

body {
	margin: 0px;
	padding: 0px;
	background-image: url(../images/border.gif);
	background-color: #424242;
}
#header {
	width: 717px;
	margin-right: auto;
	margin-left: auto;
	background-image: url(../images/bgall.jpg);
	margin-top: 30px;
}
#content {
	background-image: url(../images/bgall.jpg);
	width: 717px;
	margin-right: auto;
	margin-left: auto;
	height: 100%;
}
#content #contentin #welkomonder {
	float: left;
	height: 36px;
	width: 314px;
}
#content #contentin #navflash td {
	vertical-align: top;
}

#content #contentin #baronder {
	float: left;
	height: 36px;
}

#content #contentin #welkom {
	float: left;
	width: 314px;
}
#content #contentin #navflash {
	float: left;
}
#content #contentin #copy {
	clear: left;
}
#footer {
	width: 717px;
	margin-right: auto;
	margin-bottom: 20px;
	margin-left: auto;
}


#contentin {
	margin-right: auto;
	margin-left: auto;
	width: 698px;
	}
#headerin {
	margin-right: auto;
	margin-left: auto;
	width: 698px;
	height: 286px;
}


index.php

<!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=utf-8" />
<title>Games</title>
<link href="css/game.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="header">
  <div id="headerin"><img src="images/header.gif" alt="Game viewer" width="698" height="286" border="0" /></div>
</div>

<div id="content">
  <div id="contentin">
    <table width="0" border="0" cellpadding="0" cellspacing="0" id="navflash">
      <tr>
        <td width="172" height="349"><img src="images/navflash.gif" width="172" height="349" /></td>
      </tr>
      <tr>
        <td background="images/navflash.gif"><img src="images/partners.gif" width="172" height="56" /></td>
      </tr>
      <tr>
        <td><img src="images/partnersbg.gif" width="172" height="178" /></td>
      </tr>
      <tr>
        <td><img src="images/parnteronder.gif" /></td>
      </tr>
    </table>
    <table width="0" border="0" cellpadding="0" cellspacing="0"  id="welkom">
      <tr>
        <td><img src="images/welkom.gif" width="303" height="160" border="0" /><img src="images/bar.gif" width="11" height="160" border="0" /></td>
      </tr>
    </table>

<table width="0" border="0" cellpadding="0" cellspacing="0" id="games">
  <tr>
    <td><img src="images/games.gif" width="212" height="160" />
     </td>
  </tr>
</table> <table height="36" border="0" cellpadding="0" cellspacing="0" id="welkomonder">
  <tr>
          <td><img src="images/welkomonder.gif" width="303" height="36" /><img src="images/bar.gif" width="11" height="36" /></td>
      </tr>
      </table>  
<table width="0" border="0" cellpadding="0" cellspacing="0" id="gamesonder">
  <tr>
    <td><img src="images/gamesonder.gif" width="211" height="36" /></td>
  </tr>
</table>
 
  <table width="0" border="0" cellpadding="0" cellspacing="0" id="news">
    <tr>
      <td><img src="images/nieuws.gif" /></td>
    </tr>
  </table><table width="0" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="images/newsonder.gif" width="526" height="50" /></td>
  </tr>
</table>
  <table width="0" border="0" cellpadding="0" cellspacing="0" id="copy">
  <tr>
    <td><img src="images/copy.gif" /></td>
  </tr>
</table>

  </div>
</div>
<div id="footer"></div>
</body>
</html>



Groetjes Nick
Er is nu een fout met het definiëren van je tekenset.

Doe dat als volgt:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
nu zijn er 10 fout? :P
Ja, maar die zijn redelijk beschijvend toch? Je gebruikt align, wat niet mag. Er mist een body tag voor tabel, enzovoort.
Line 34, Column 25: there is no attribute "align".

<table width="717" align="center" cellpadding="0" cellspacing="0" class="layou…


maar dat ik zie tog align staan? en "center"
Nee, ze bedoelen: het attribuut "align" is niet volgens de standaard, maar jij gebruikt het toch.
align="center" dus moet ik dat verwijderen dan?
Precies. Opmaak centreren doe je door de boel in een div te zetten. Tabellen gebruiken voor lay-out is niet meer van deze tijd.

Reageren