Autor Zpráva
huna
Profil *
mám problém, validátor mi hlásí chybu u prázdných divů, nevíte v čem by mohl být problém? mám to v xhtml 1.0 transitional

Error Line 36 column 23: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.

<div id="bookimage">&nbsp;</div>

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Error Line 67 column 2: unclosed end-tag requires SHORTTAG YES.
<div id="end"></div>
krteczek
Profil
to chce vidět komplet kod, takhle se to nedá asi máš blokový prvek v řádkovém?
huna
Profil *
ok, přikládám tady..


<?xml version="1.0"?>
<!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=windows-1250" />
<meta name="author" content="huna" />
<link rel="stylesheet" type="text/css" href="kvinta-styl.css" title="kvinta-styl.css" />
<link rel="stylesheet" type="text/css" href="kvinta-styl2.css" title="kvinta-styl2.css" />
<title>Kvinta</title>
</head>
<body>
<script type="text/javascript" src="styleswitch.js"></script>
<div id="navigace">
[ <a href="index.html">Home</a> ]
[ <a href="galerie.php">Galerie</a> ]
[ <a href="trida.html">Třída</a> ]
</div>
<div id="kvintaspageimage">&nbsp;</div>
<div class="lineimage">&nbsp;</div>
<p></p>
<div class="lineimage">&nbsp;</div><br />
<p></p>
<div id="aktualne">
<div id="aktualneimage">&nbsp;</div>
<strong>20.5. '06</strong> - novinka<br />
<strong>17.5. '06</strong> - novinka<br />
<strong>12.5. '06</strong> - novinka<br />
<strong>12.5. '06</strong> - novinka<br />
<strong>11.5. '06</strong> - novinka<br />
<strong>7.5. '06</strong> - novinka<br />
<strong>6.5. '06</strong> - novinka<br />
</div><br />
<div class="lineimage">&nbsp;</div><br />
<p>
<div id="bookimage">&nbsp;</div>
<iframe frameborder="0" scrolling="auto" width="600" height="800" src="http://vsevjednom.cz/guestbook.php?gb=1750"></iframe><br />
</p>
<div class="lineimage">&nbsp;</div>
<p>
<div id="odkazyimage">&nbsp;</div>
<a href="http://www.seznam.cz">odkaz</a><br />
<a href="http://www.seznam.cz">odkaz</a><br />
<a href="http://www.seznam.cz">odkaz</a><br />
<a href="http://www.seznam.cz">odkaz</a><br />
<a href="http://www.seznam.cz">odkaz</a><br />
</p>
<div class="lineimage">&nbsp;</div>

<address id="vyroba">
V případě jakýchkoli nesrovnalostí neváhejte kontaktovat <a href="autor.html">autora</a>.<br />
<script type="text/javascript" src="aktualizace.js"></script><br />
xhtml version 1.0 <a href="http://validator.w3.org/check/referer">validní</a><br />

<div id="changestyle">
<script type="text/javascript" src="styly.js"></script>
<h4 onclick="zobrazSkryj('oddil1')">změnit styl</h4>
</div>

<div id="oddil1" class="skryvany">
<a href="#" onclick="setStyle('')">beze stylu</a><br />
<a href="#" onclick="setStyle('kvinta-styl.css')">výchozí styl</a><br />
<a href="#" onclick="setStyle('kvinta-styl2.css')">modrý styl</a><br />
</div>
</address
<div id="end">&nbsp;</div>
</body>
</html>
Timy
Profil
<p>
<div id="bookimage">&nbsp;</div>

V odstavci nemůže být blokový element.
Radek Hrabůvka
Profil
Válidátorem jsem to neproháněl, ale vidím tam pár prázdných odstavců:
<p></p>

Nejsem si 100% jistý, ale na 99% si myslím, že odstavce nemůžou obsahovat divy. Ale divy můžou obsahovat téměř cokoliv, třeba další divy a odstavce.

Validátoru to určitě nevadí, až na značku <p>, ale tahle část by určitě šla zapsat mnohem lépě:
<br />
</div><br />
<div class="lineimage">&nbsp;</div><br />
<p>
<div id="bookimage">&nbsp;</div>
huna
Profil *
díky moc..
huna
Profil *
tak sem na to přišel, s tim že <p> nesmí obsahovat div si měl nejspíš pravdu (validátor to po tomhle zákroku už nepíše chybový hlášení), jenže pak tu byl další problém a to neuzaavřenej tag </address> a když sem tadytohle všechno opravil tak mi to psalo chybu furt u 2 divů ktreý sou právě v 'addressu' ------> address nesmí obsahovat divy, uf tyhle chyby nemám rád. jinak dík
Toto téma je uzamčeno. Odpověď nelze zaslat.

0