how to fix this validation error

G

Greg N.

I added a google site search to the site in my sig. I tried to float
part of the form left, and the search button right.

It looks and works OK, but it does not validate. It is obviously no
allowed to spread a form among multiple DIVs. How can I fix this
(without forgoing the right/left float effect)?
 
E

Els

Greg said:
I added a google site search to the site in my sig. I tried to float
part of the form left, and the search button right.

It looks and works OK, but it does not validate. It is obviously no
allowed to spread a form among multiple DIVs. How can I fix this
(without forgoing the right/left float effect)?

Pretty difficult to tell what's wrong without seeing the code, but
just guessing: you can float the button right, set text-align on the
rest of the form left, no need to add divs. Again though: just
guessing, I haven't seen your code, nor the desired look in a browser.

As for not being allowed to have multiple divs inside a form: I don't
think that's a correct assumption. If you got validation errors,
they're probably indicating something else that's wrong, maybe nested
those divs wrongly?
 
N

Numberwhun

Greg said:
I added a google site search to the site in my sig. I tried to float
part of the form left, and the search button right.

It looks and works OK, but it does not validate. It is obviously no
allowed to spread a form among multiple DIVs. How can I fix this
(without forgoing the right/left float effect)?

In looking at the source for your page take a look at the following:

### Begin Source ###

<div class=counter style="text-align:center;">
<img src="http://coolhaus.de/count?id=greg-tour&amp;type=q" width=0
height=0 alt=" ">
</div>
</div>

### End Source ###

If you remove the second </div> from this and then re-validate, you will
see that there are 8 other errors that need to be corrected.

Regards,

Jeff Kirkland
 
N

Numberwhun

Greg said:
Sure, because it will throw my _correct_ div nesting out of whack.


Not sure, but it looked to be an extra closing div. It was basically
complaining about one of the listed closing tags NOT having an opening
tag. That seemed to be the tag that was causing this. I say try it and
see.

Regards,

Jeff
 
G

Greg N.

Numberwhun said:
It was basically
complaining about one of the listed closing tags NOT having an opening
tag.

I understand, but I think you're wrong. There is a matching opening
DIV. Just have a closer look.
 
E

Els

Greg said:

Looking at validator result, it says you have <input type=hidden
(etc)> directly under form. It needs to be inside a div.
So, instead of:

<FORM method=GET action="http://www.google.com/search">
<input type=hidden name=sitesearch value="hothaus.de">
<div style="float:left;">
Diese Web Site durchsuchen:
<INPUT TYPE=text name=q size=45 maxlength=255 value="">
</div>

<div style="float:right;">
<INPUT type=submit name=btnG VALUE="Google-Suche">
</div>
</FORM>

Make it:

<FORM method=GET action="http://www.google.com/search">
<div style="float:left;">
<input type=hidden name=sitesearch value="hothaus.de">
Diese Web Site durchsuchen:
<INPUT TYPE=text name=q size=45 maxlength=255 value="">
</div>

<div style="float:right;">
<INPUT type=submit name=btnG VALUE="Google-Suche">
</div>
</FORM>
 
J

Jonathan N. Little

Greg said:
I understand, but I think you're wrong. There is a matching opening
DIV. Just have a closer look.
<your code>

<p>
<div class=linklist>
<!-- links section -->
&nbsp;<a class=link
href=../greg-tour-2005>&nbsp;2005:&nbsp;Rum&auml;nien,&nbsp;Moldawien,&nbsp;Ukraine&nbsp;</a>
<br>
&nbsp;<a class=link
href=../greg-tour-2004>&nbsp;2004:&nbsp;Puszta,&nbsp;Karpaten&nbsp;und&nbsp;Pindos&nbsp;</a>

<br>
&nbsp;<a class=link
href=../greg-tour-2003>&nbsp;2003:&nbsp;Reise&nbsp;um&nbsp;die&nbsp;&Auml;g&auml;is&nbsp;</a>
<br>
&nbsp;<a class=link
href="http://coolhaus.de/tour-forum">&nbsp;Forum&nbsp;</a>
<br>
<!-- links section end --></p>
</div>

</your code>

Looks like a nesting error...

<p>
<div>...
</p>
</div>
 
M

Michael Winter

On 31/01/2006 22:54, Greg N. wrote:

[snip]

Three of your links are missing quotes around the href attribute values.
The forward slash (/) then acts as a NET-enabling end to the start tag.

Either get into the habit of quoting all attribute values, or be very
careful when omitting them.

You might want to consider moving those in-line style attributes to an
external style sheet, and keyword-stuffing isn't very nice (especially
when it's visible).

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top