Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

TheChessMan

Problema com validação

Recommended Posts

<div id="busca">					<form action="" method="post">						<label for="campobusca">Busca												<input id="campobusca" class="inputtexto" type="text" tabindex="1" />											   </label>												<input type="image" src="" />					</form>			</div>

O que tem de errado com este código?

Ele da o seguinte erro qdo eu valido no w3c:

 

 

Error  Line 56 column 29: document type does not allow element "label" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.						<label for="campobusca">Busca<input id="campobusca" class="inputtexto" typThe 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>").

O DOC TYPE ta definido certinho e tudo, (XHTML Strict 1.0)

Compartilhar este post


Link para o post
Compartilhar em outros sites

Tente:

 

<label for="campobusca">Busca</label><input id="campobusca" class="inputtexto" type="text" tabindex="1" />

Compartilhar este post


Link para o post
Compartilhar em outros sites

Resolvido o problema:

<div id="busca">					<form action="" method="post">						<p>							<label for="campobusca">								<img src="imagens/busca.png" alt="Busca" height="10" width="30" />								<input id="campobusca" class="inputtexto" type="text" tabindex="1" />							</label>							<input id="buscar" title="Buscar" tabindex="2" type="image" src="imagens/busca_submit.png" />						</p>					</form>			</div>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.