• Resolved Hopper

    (@faithfilly)


    Before I spend any more hours searching through my index.php file to try to find out exactly what is causing these 10 identical error messages:

    “document type does not allow element “div” here; missing one of “object”, “applet”, “map”, “iframe”, “button”, “ins”, “del” start-tag”

    …when checking my site for markup validation, I should ask others if maybe I may be looking to solve this issue in the wrong file?

    Here is my index.php file.

    Here is my weblog.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Anonymous User

    (@anonymized-3085)

    Try taking this section out of your <h2>…</h2>
    <div class="comments-link"><?php comments_popup_link(__('Post a Comment!', 'sandbox'), __('1 Comment', 'sandbox'), __('% Comments', 'sandbox')) ?></div>

    Thread Starter Hopper

    (@faithfilly)

    When I do that, it removes the link for people to be able to post a comment… but it does cause the site to validate!

    If only now to figure out how to enable the link to post a comment to be there in the index.php, but without invalidating the site.

    Anonymous User

    (@anonymized-3085)

    reinsert it after the </h2>

    Thread Starter Hopper

    (@faithfilly)

    That too caused the link to disappear.

    Thread Starter Hopper

    (@faithfilly)

    Maybe seeing the results from the validation markup page might help?

    Here is how that came out.

    Thread Starter Hopper

    (@faithfilly)

    Is it possible that the necessary editing to be done is not in the index.php, but rather another file instead?

    Anonymous User

    (@anonymized-3085)

    You’ve still got that div within the <h2>…</h2>

    So a suggestion, change the div to a span.

    Thread Starter Hopper

    (@faithfilly)

    I tried that several times and no way I tried works.

    Is this normal for something to be such a pain in the butt to fix?

    Is this the right forum for me to be asking questions like this?

    Anonymous User

    (@anonymized-3085)

    Leave it as span, and change your style for
    div.comments-link
    to
    span.comments-link

    Thread Starter Hopper

    (@faithfilly)

    I just thought of that myself. In fact, that was what I was busy editing as you were probably composing your most recent post here. ??

    It was the solution! Thank you for helping to push me into that direction faster!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Invalid Markup because of a "div"’ is closed to new replies.