Validering af XHTML dokument
Jeg er for sjovt begyndt at lave noget XHTML og noget CSShar bare nogle problemer med at få valideret XHTML dokumentet (css'en er ikke så vigtig nu lige)
XHTML dokumentet ser sådan ud
<?xml version="1.0"?>
<!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" lang="da">
<head>
<title>links</title>
<link rel="stylesheet" href="bartel.css" type="text/css" />
</head>
<body>
<p>
<img src="top.jpg" alt="TOP BANNER" /><div id="boks1"> <div id="menu"><a href="">Forside</a><a href="">Mig</a><a href="">Uddannelse/jobs</a><a href="">Referencer</a></div></div><div id="boks2"><img src="menu.jpg" alt="TOP BANNER" />
</div>
<br />
</p>
</body>
</html>
CSS'en ser sådan her ud
body {
color: blue;
font-weight: bold;
background-color: #e9e9e9;
margin: 0px 0px 0px 0px;
}
#boks1 {
position:absolute;
top: 134px;
left:0px;
width: 1024px;
height:23px ;
background-color:#e9e9e9;
}
#boks2 {
position:absolute;
top: 134px;
left:636px;
width: 500px;
height:23px ;
background-color:#e9e9e9;
}
#menu a {
text-align:center;
padding: 2px;
width:159px;
Height:23px;
color:red;
font-family: verdana;
font-size: 12;
background: url("1.jpg");
text-decoration: none;}
#menu a:hover {
width:159px;
Height:23px;
background: url("2.jpg") ;
font-family: verdana;
font-size: 12;
color: white;
text-decoration: none;
}
De fejl jeg får ser sådan her ud
1. # Error Line 14 column 53: document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag.
...g" alt="TOP BANNER" /><div id="boks1"><div id="menu"><a href="">Forside</a><a
2. # Error Line 14 column 191: document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag.
...rencer</a></div></div><div id="boks2"><img src="menu.jpg" alt="TOP BANNER" />
Jeg er klar over at fejlen ligger ved at jeg smider to "DIV" ind i hinanden, hvad kan jeg gøre for at få det til at virke? uden at jeg at layoutet bliver lavet helt om?
