Support » Fixing WordPress » w3c footer validation help!

  • i’ve solved all but ONE of my w3c XHTML errors. The last one resides in my footer. i have a few links for “about us”, “contact”, etc. and need them centered. Here is my current code from footer.php:

    <div align='center'>
    <a href="">contact</a>
    <a href="">credits</a>
    <a href="">disclaimer</a>
    <a href="">policies</a>

    The resulting error from the W3C validator is:

    Error Line 360 column 19: document type does not allow element "div" here.
    <div align='center'>

    I’ve discovered that the regular <center> code has been deprecated. Is there an easy solution for this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • whooami



    where is your closing </body> tag? you cant have tags like that outside of your closing </body> tag?

    it goes like this:


    i noticed the same thing. the default setup in this footer.php only had the ending tags for the </html> and </body>

    I have achieved a point to where my page validates with w3c, but I am not totally satisfied with the result. I get my footer to display without having errors, but it doesn’t display where I would like it to.

    The blog is at . I put text at the bottom where the footer currently displays and where i want it to. Here is my current footer.php:

    <div id="footer">
    </div> <?php /* footer */ ?>
    </div></div></div></div></div></div></div></div></div></div> <?php /* postcolumn */ ?>
    <div style="clear: both"></div>
    </div> <?php /* page_container */ ?>
    <?php do_action('wp_footer'); ?>

    Whenever I try to add text below in the white area underneath the post area, w3c tells me:

    “The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements — such as a “style” element in the “body” section instead of inside “head” — or two elements that overlap (which is not allowed).”

    Any help or guidance is appreciated, thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘w3c footer validation help!’ is closed to new replies.