Avatar billede rones Nybegynder
30. juni 2003 - 11:54 Der er 13 kommentarer og
2 løsninger

Kan I finde een/nogle fejl i min HTML-kode?

Kan I finde een/nogle fejl i min HTML-kode? Tak.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<head>
<title>Enur</title>
<style type="text/css">
<!--
a.menu {
background : #dddddd;
display:block;
width:100%;
}

a.menu:hover {
background : #999999
display:block;
width:100%;
}
-->
</style>

<style type="text/css">
<!--

table.menu {border: 1px solid #393939;}

td.menu, .overskrift {font: bold 12px verdana, sans-serif;text-align: center;}

a.menupunkt {
    text-decoration: none;
    background-color: #008080;
    color: #525252;
    border-top : 1px solid #FFFFFF;
    border-left : 1px solid #FFFFFF;
    border-bottom : 1px solid #6D6D6D;
    display: block;
    line-height: 22px;
    width:99%;
}

a.menupunkt:hover {
    text-decoration: underline overline;
    background-color: #669999;
    border-top : 1px solid #8F9CC6;
    border-left : 1px solid #8F9CC6;
    border-bottom : 1px solid #6D6D6D;
    display: block;
    color: #000000;
    width:99%;
}

.overskrift {
    background-color: #8F9CC6;
    color: #000000;
    border-top: 1px solid #D5DFFF;
    border-left: 1px solid #D5DFFF;
    border-bottom: 1px solid #393939;
    line-height: 25px;
}
-->
</style>

<style type="text/css">
<!--
body {
    scrollbar-face-color:#008080;
}
--!>
</style>

<base target="iframe">

</head>

<body bgcolor="#C0C0C0">

<br>

<div align="center">
  <table border="1" cellpadding="0" cellspacing="8" width="871" bgcolor="#808080" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000" height="423">
    <tr>
      <td align="right" valign="top" width="162" bgcolor="#008080" height="23">
        <p align="center"><b>Menu</b></p>
      </td>
      <td width="15" bgcolor="#008080" height="23">&nbsp;</td>
      <td valign="bottom" colspan="3" width="654" bgcolor="#008080" height="23"><font face="Verdana" size="3"><b>Enur</b></font></td>
</tr>
    <tr>
      <td valign="top" width="162" bgcolor="#008080" height="380"><table cellpadding="0" cellspacing="0" border=0 class=menu width=162>
<tr><td class=menu width="158"><a href="test.htm" class=menupunkt>Home</a></td></tr>
<tr><td class=menu width="158"><a href="link1.html" class=menupunkt>Bon Jovi</a></td></tr>
<tr><td class=menu width="158"><a href="link1.html" class=menupunkt>live</a></td></tr>
<tr><td class=menu width="158"><a href="link1.html" class=menupunkt>Music tips</a></td></tr>
<tr><td class=menu width="158"><a href="link1.html" class=menupunkt>Bootlegs</a></td></tr>
<tr><td class=menu width="158"><a href="link1.html" class=menupunkt>Links</a></td></tr>
<tr><td class=menu width="158"><a href="link1.html" class=menupunkt>Contact</a></td></tr>
<tr><td><img border="0" src="bounce.jpg" alt="Bounce cover"></TD></tr>
</table></td>
      <td width="15" bgcolor="#008080" height="380">&nbsp;</td>
      <td valign="top" width="312" height="380"><font size="3">


        </font><iframe src="test.htm" scrolling="no" frameborder="0" name="iframe" width="654" height="100%" marginwidth="1" marginheight="1"></iframe>
      </td>
    </tr>
  </table>

<br>
 
  <table width="95%" border="1" cellspacing="1" cellpadding="1" bgcolor="#808080" bordercolor="#000000" background="Unavngivet.jpg">
    <tr>
      <td height="17">
        <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">©
          &amp; ® - 2003</font></div>
      </td>
    </tr>
  </table>

</div>

</body>

</html>
Avatar billede ahv Nybegynder
30. juni 2003 - 11:56 #1
Der er mange, rigtig mange ->

Du kan bl.a. ikke bruge height den skal du have ind i dit style.
Du skal have " eundt om f.eks. border=0 det skal være border="0"

Var det sådanne fejl du tænkte på?
Avatar billede jpvj Nybegynder
30. juni 2003 - 12:09 #2
Tilføj et META tag, der definerer dit charset:

...
<head>
<title>Enur</title>
<META http-equiv="content-type" content="text/html; charset=ISO-8859-1">

....

Test derefter din HTML fil på validator.w3.org.

Så får du luset den helt ud!

JP
Avatar billede rones Nybegynder
30. juni 2003 - 12:15 #3
Tak, men hvad mener du med at jeg skal have height og bordercolor osv. ind i style?
Avatar billede rones Nybegynder
30. juni 2003 - 12:20 #4
og hvad menes der med det her: This page is not Valid HTML 4.0 Transitional!
??
Avatar billede ahv Nybegynder
30. juni 2003 - 12:25 #5
rones -> At den ikke overhalder standarterne. alle de steder hvor du skriver heieght="80" det skal udskiftes med ->
style="height: 80px;"

Der findes heller ingen valign, den skal også ind i style argumentet ->
style="vertical-align: top;"
Avatar billede ahv Nybegynder
30. juni 2003 - 12:33 #6
rones -> For lidt flere points vil jeg gerne gennemgå din kode så den burde blive Valid HTML.
Avatar billede rones Nybegynder
30. juni 2003 - 12:34 #7
Det må du meget gerne tak!
Avatar billede jpvj Nybegynder
30. juni 2003 - 12:35 #8
rones> Det betyder at der er fejl i din HTML kode, dvs. den overholder ikke "HTML 4.0 Transitional" definitionen. Dette kan du opnå ved at rette de ting den fortæller dig, og validere den igen...
Avatar billede ahv Nybegynder
30. juni 2003 - 12:38 #9
Det tager lige et par min.
Avatar billede ahv Nybegynder
30. juni 2003 - 12:59 #10
Prøv ->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Enur</title>
<style type="text/css">
a.menu {
    background: #dddddd;
    display: block;
    width: 100%;
}
a.menu:hover {
    background: #999999
    display: block;
    width: 100%;
}
table.menu {
    border: 1px solid #393939;
}
td.menu, .overskrift {
    font: bold 12px verdana, sans-serif;
    text-align: center;
}
a.menupunkt {
    text-decoration: none;
    background-color: #008080;
    color: #525252;
    border-top: 1px solid #FFFFFF;
    border-left: 1px solid #FFFFFF;
    border-bottom: 1px solid #6D6D6D;
    display: block;
    line-height: 22px;
    width: 99%;
}
a.menupunkt:hover {
    text-decoration: underline overline;
    background-color: #669999;
    border-top: 1px solid #8F9CC6;
    border-left: 1px solid #8F9CC6;
    border-bottom: 1px solid #6D6D6D;
    display: block;
    color: #000000;
    width: 99%;
}
.overskrift {
    background-color: #8F9CC6;
    color: #000000;
    border-top: 1px solid #D5DFFF;
    border-left: 1px solid #D5DFFF;
    border-bottom: 1px solid #393939;
    line-height: 25px;
}
body {
    scrollbar-face-color: #008080;
}
</style>
<base target="iframe">
</head>
<body bgcolor="#C0C0C0">
<br>
<div align="center">
<table style="border: 1px solid #000000; width: 871px; background-color: #808080; height: 423px;" cellpadding="0" cellspacing="8">
<tr>
    <td style="vertical-align: top; width: 162px; background-color: #008080; height: 23px;"><div align="center"><b>Menu</b></div></td>
    <td style="width: 15px; background-color: #008080; height: 23px;">&nbsp;</td>
    <td style="vertical-align: bottom; width: 654px; height: 23px;" colspan="3"><h3><b>Enur</b></h3></td>
</tr>
<tr>
    <td style="vertical-align: top; width: 162px; background-color: #008080; height: 380;"><table cellpadding="0" cellspacing="0" border="0" class="menu" width="162">
    <tr>
        <td class="menu" width="158"><a href="test.htm" class="menupunkt">Home</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">Bon Jovi</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">live</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">Music tips</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">Bootlegs</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">Links</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">Contact</a></td>
    </tr>
    <tr>
        <td><img border="0" src="bounce.jpg" alt="Bounce cover"></td>
    </tr>
    </table></td>
    <td style="width: 15px; background-color: #008080; height: 380px;">&nbsp;</td>
    <td style="vertical-align: top; width: 312px; height: 380px;"><iframe src="test.htm" scrolling="no" frameborder="0" name="iframe" style="width: 654px; height: 100%;" marginwidth="1" marginheight="1"></iframe></td>
</tr>
</table>
<br>
<table style="width: 95%; border: 1px solid #000000; background-color: #808080; background-image: url('Unavngivet.jpg'); " cellspacing="1" cellpadding="1">
<tr>
    <td style="height: 17px;"><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">© &amp; ® - 2003</font></div>
    </td>
</tr>
</table>
</div>
</body>
</html>
Avatar billede rones Nybegynder
30. juni 2003 - 13:22 #11
Der er noget galt, for den øverste tabel (den hvor der står Enur) skal have den samme grønne farve som de andre. Og man skal kunne se border....
Avatar billede ahv Nybegynder
30. juni 2003 - 13:24 #12
Skal der også være border rundt om alle de andre grønne felter ? prøv at se nu (kun border om Enur) ->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Enur</title>
<style type="text/css">
a.menu {
    background: #dddddd;
    display: block;
    width: 100%;
}
a.menu:hover {
    background: #999999
    display: block;
    width: 100%;
}
table.menu {
    border: 1px solid #393939;
}
td.menu, .overskrift {
    font: bold 12px verdana, sans-serif;
    text-align: center;
}
a.menupunkt {
    text-decoration: none;
    background-color: #008080;
    color: #525252;
    border-top: 1px solid #FFFFFF;
    border-left: 1px solid #FFFFFF;
    border-bottom: 1px solid #6D6D6D;
    display: block;
    line-height: 22px;
    width: 99%;
}
a.menupunkt:hover {
    text-decoration: underline overline;
    background-color: #669999;
    border-top: 1px solid #8F9CC6;
    border-left: 1px solid #8F9CC6;
    border-bottom: 1px solid #6D6D6D;
    display: block;
    color: #000000;
    width: 99%;
}
.overskrift {
    background-color: #8F9CC6;
    color: #000000;
    border-top: 1px solid #D5DFFF;
    border-left: 1px solid #D5DFFF;
    border-bottom: 1px solid #393939;
    line-height: 25px;
}
body {
    scrollbar-face-color: #008080;
}
</style>
<base target="iframe">
</head>
<body bgcolor="#C0C0C0">
<br>
<div align="center">
<table style="border: 1px solid #000000; width: 871px; background-color: #808080; height: 423px;" cellpadding="0" cellspacing="8">
<tr>
    <td style="vertical-align: top; width: 162px; background-color: #008080; height: 23px;"><div align="center"><b>Menu</b></div></td>
    <td style="width: 15px; background-color: #008080; height: 23px;">&nbsp;</td>
    <td style="width: 654px; height: 23px; background-color: #008080; border: 1px solid #000000;" colspan="3"><h3><b>Enur</b></h3></td>
</tr>
<tr>
    <td style="vertical-align: top; width: 162px; background-color: #008080; height: 380;"><table cellpadding="0" cellspacing="0" border="0" class="menu" width="162">
    <tr>
        <td class="menu" width="158"><a href="test.htm" class="menupunkt">Home</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">Bon Jovi</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">live</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">Music tips</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">Bootlegs</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">Links</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">Contact</a></td>
    </tr>
    <tr>
        <td><img border="0" src="bounce.jpg" alt="Bounce cover"></td>
    </tr>
    </table></td>
    <td style="width: 15px; background-color: #008080; height: 380px;">&nbsp;</td>
    <td style="vertical-align: top; width: 312px; height: 380px;"><iframe src="test.htm" scrolling="no" frameborder="0" name="iframe" style="width: 654px; height: 100%;" marginwidth="1" marginheight="1"></iframe></td>
</tr>
</table>
<br>
<table style="width: 95%; border: 1px solid #000000; background-color: #808080; background-image: url('Unavngivet.jpg'); " cellspacing="1" cellpadding="1">
<tr>
    <td style="height: 17px;"><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">© &amp; ® - 2003</font></div>
    </td>
</tr>
</table>
</div>
</body>
</html>
Avatar billede rones Nybegynder
30. juni 2003 - 13:26 #13
ja, der var den, nu mangler der bare border i alle tabellerne :D
Avatar billede ahv Nybegynder
30. juni 2003 - 13:28 #14
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Enur</title>
<style type="text/css">
a.menu {
    background: #dddddd;
    display: block;
    width: 100%;
}
a.menu:hover {
    background: #999999
    display: block;
    width: 100%;
}
table.menu {
    border: 1px solid #393939;
}
td.menu, .overskrift {
    font: bold 12px verdana, sans-serif;
    text-align: center;
}
a.menupunkt {
    text-decoration: none;
    background-color: #008080;
    color: #525252;
    border-top: 1px solid #FFFFFF;
    border-left: 1px solid #FFFFFF;
    border-bottom: 1px solid #6D6D6D;
    display: block;
    line-height: 22px;
    width: 99%;
}
a.menupunkt:hover {
    text-decoration: underline overline;
    background-color: #669999;
    border-top: 1px solid #8F9CC6;
    border-left: 1px solid #8F9CC6;
    border-bottom: 1px solid #6D6D6D;
    display: block;
    color: #000000;
    width: 99%;
}
.overskrift {
    background-color: #8F9CC6;
    color: #000000;
    border-top: 1px solid #D5DFFF;
    border-left: 1px solid #D5DFFF;
    border-bottom: 1px solid #393939;
    line-height: 25px;
}
body {
    scrollbar-face-color: #008080;
}
</style>
<base target="iframe">
</head>
<body bgcolor="#C0C0C0">
<br>
<div align="center">
<table style="border: 1px solid #000000; width: 871px; background-color: #808080; height: 423px;" cellpadding="0" cellspacing="8">
<tr>
    <td style="vertical-align: top; width: 162px; background-color: #008080; height: 23px; border: 1px solid #000000;"><div align="center"><b>Menu</b></div></td>
    <td style="width: 15px; background-color: #008080; height: 23px; border: 1px solid #000000;">&nbsp;</td>
    <td style="width: 654px; height: 23px; background-color: #008080; border: 1px solid #000000;" colspan="3"><h3><b>Enur</b></h3></td>
</tr>
<tr>
    <td style="vertical-align: top; width: 162px; background-color: #008080; height: 380; border: 1px solid #000000;"><table cellpadding="0" cellspacing="0" border="0" class="menu" width="162">
    <tr>
        <td class="menu" width="158"><a href="test.htm" class="menupunkt">Home</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">Bon Jovi</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">live</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">Music tips</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">Bootlegs</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">Links</a></td>
    </tr>
    <tr>
        <td class="menu" width="158"><a href="link1.html" class="menupunkt">Contact</a></td>
    </tr>
    <tr>
        <td><img border="0" src="bounce.jpg" alt="Bounce cover"></td>
    </tr>
    </table></td>
    <td style="width: 15px; background-color: #008080; height: 380px; border: 1px solid #000000;">&nbsp;</td>
    <td style="vertical-align: top; width: 312px; height: 380px; border: 1px solid #000000;"><iframe src="test.htm" scrolling="no" frameborder="0" name="iframe" style="width: 654px; height: 100%;" marginwidth="1" marginheight="1"></iframe></td>
</tr>
</table>
<br>
<table style="width: 95%; border: 1px solid #000000; background-color: #808080; background-image: url('Unavngivet.jpg'); " cellspacing="1" cellpadding="1">
<tr>
    <td style="height: 17px;"><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">© &amp; ® - 2003</font></div>
    </td>
</tr>
</table>
</div>
</body>
</html>
Avatar billede rones Nybegynder
30. juni 2003 - 13:33 #15
Takker
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester