how to fix this validation error

Discussion in 'HTML' started by Greg N., Jan 31, 2006.

  1. Greg N.

    Greg N. Guest

    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/
    Greg N., Jan 31, 2006
    #1
    1. Advertising

  2. Greg N.

    Els Guest

    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 -
    Els, Jan 31, 2006
    #2
    1. Advertising

  3. Greg N.

    Greg N. Guest

    Greg N., Jan 31, 2006
    #3
  4. Greg N.

    Numberwhun Guest

    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
    Numberwhun, Jan 31, 2006
    #4
  5. Greg N.

    Numberwhun Guest

    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
    Numberwhun, Jan 31, 2006
    #5
  6. Greg N.

    Greg N. Guest

    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/
    Greg N., Jan 31, 2006
    #6
  7. Greg N.

    Els Guest

    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 -
    Els, Jan 31, 2006
    #7
  8. 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;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>

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Feb 1, 2006
    #8
  9. 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.
    Michael Winter, Feb 1, 2006
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Patrick Philippot
    Replies:
    0
    Views:
    449
    Patrick Philippot
    Apr 14, 2006
  2. Xah Lee
    Replies:
    22
    Views:
    1,111
    Tim Roberts
    Mar 21, 2006
  3. Greg N.
    Replies:
    0
    Views:
    364
    Greg N.
    Jan 31, 2006
  4. Xah Lee
    Replies:
    23
    Views:
    1,049
    Tim Roberts
    Mar 21, 2006
  5. Xah Lee
    Replies:
    21
    Views:
    770
    Tim Roberts
    Mar 21, 2006
Loading...

Share This Page