• Resolved newhope4u

    (@newhope4u)


    New WP user here! Trying to validate my post at:
    http://christian-dating-service-plus.com/eharmony-dating-service.htm
    How do I fix this error. Thanks much.
    I get this one error reading:

    Error Line 127, column 95: ID “commentform” already defined .

    …comments-post.php” method=”post” id=”commentform”>
    Hi All:

    An “id” is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).

    Thanks for any help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Give the div your commentform form resides in a different id, or change it to a css class (i.e. class="commentform", then change any reference to #commentform in your stylesheet to .commentform). As noted by the validator, id’s must be unique on a page.

    Actually it also say how to correct it:
    Line 122, column 9: ID “commentform” first defined here
    <div id=”commentform”>

    And yes, you have the same ID on the same page:

    <div id="commentform">
    <form action="http://christian-dating-service-plus.com/wp-comments-post.php" method="post" id="commentform">

    Make the div a class… and edit your stylesheet accordingly.

    Thread Starter newhope4u

    (@newhope4u)

    Kafkaesqui and Moshu:

    Thanks so much…I am going to get to it. I am new to CSS and PHP and WordPress. But I feel like I know you guys because I have been inhaling all the wonderful and helpful comments you have made to others on the forum…I am slowly learning, and WP is awesome. Again, many thanks..

    David

    Thread Starter newhope4u

    (@newhope4u)

    Thanks guys…got it validated

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Trouble Validating Post Error’ is closed to new replies.