Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > how to fix this validation error

Reply
Thread Tools

how to fix this validation error

 
 
Greg N.
Guest
Posts: n/a
 
      01-31-2006
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)?

--
Gregor's Motorradreisen:
http://hothaus.de/greg-tour/
 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      01-31-2006
Greg N. wrote:

> 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?

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
 
Reply With Quote
 
 
 
 
Greg N.
Guest
Posts: n/a
 
      01-31-2006
Els wrote:

>>I added a google site search to the site in my sig.


> Pretty difficult to tell what's wrong without seeing the code


The site in my sig:
http://hothaus.de/greg-tour/


--
Gregor's Motorradreisen:
http://hothaus.de/greg-tour/
 
Reply With Quote
 
Numberwhun
Guest
Posts: n/a
 
      01-31-2006
Greg N. wrote:
> 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

 
Reply With Quote
 
Numberwhun
Guest
Posts: n/a
 
      01-31-2006
Greg N. wrote:
> Numberwhun wrote:
>
>> 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.

>
>
> 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

 
Reply With Quote
 
Greg N.
Guest
Posts: n/a
 
      01-31-2006
Numberwhun wrote:

> 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.

--
Gregor's Motorradreisen:
http://hothaus.de/greg-tour/
 
Reply With Quote
 
Els
Guest
Posts: n/a
 
      01-31-2006
Greg N. wrote:

> Els wrote:
>
>>>I added a google site search to the site in my sig.

>
>> Pretty difficult to tell what's wrong without seeing the code

>
> The site in my sig:
> http://hothaus.de/greg-tour/


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>


--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      02-01-2006
Greg N. wrote:
> Numberwhun wrote:
>
>> 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.
>

<your code>

<p>
<div class=linklist>
<!-- links section -->
&nbsp;<a class=link
href=../greg-tour-2005>&nbsp;2005:&nbsp;Rum&auml;nien,&nbsp;Moldawie n,&nbsp;Ukraine&nbsp;</a>
<br>
&nbsp;<a class=link
href=../greg-tour-2004>&nbsp;2004:&nbsp;Puszta,&nbsp;Karpaten&nbsp;u nd&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>

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Michael Winter
Guest
Posts: n/a
 
      02-01-2006
On 31/01/2006 22:54, Greg N. wrote:

[snip]

> http://hothaus.de/greg-tour/


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

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FIX] Another possible fix for the missing ASP .Net tab problem Patrick Philippot ASP .Net 0 04-14-2006 11:48 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Perl Misc 21 03-21-2006 07:02 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Python 23 03-21-2006 07:02 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Java 22 03-21-2006 07:02 AM
Re: how to fix this validation error Greg N. HTML 0 01-31-2006 11:12 PM



Advertisments