htvqkoa Posted July 31, 2006 Share Posted July 31, 2006 (edited) I am trying to validate my website and I am having difficulty fixing some errors. I am not quite sure why I am getting the errors and maybe someone can explain to me a little bit, b/c my research has left me empty handed. This line is producing a lot of errors, actually. I am getting the following error(s): "document type does not allow element "div" here; assuming missing "object"" My code is: # <div id="header" # # onclick="location.href='http://lauralohr.com/wordpress'; # # " style="cursor: pointer;"> # # <div id="headerimg"> # # </div> How can I fix this? I am still kind of new at this. I appreciate any help you can offer! Edited July 31, 2006 by htvqkoa Quote Link to comment Share on other sites More sharing options...
marie b. Posted August 1, 2006 Share Posted August 1, 2006 (edited) It may have something to do with the linebreaks in the source, since it appears to be reading the onclick as its own object and not as a part of the opening div's code. You could also change that code to be simpler, like <a href="YOURURL"><div id="header"><div id="headerimg"></div></div></a> You could even place the headerimg as a background to the header div itself, so you don't have to have two divs for one thing. Edited August 1, 2006 by marie b. Quote Link to comment Share on other sites More sharing options...
marie b. Posted August 1, 2006 Share Posted August 1, 2006 Also, your header div has no closing tag. Clicking anywhere on your site, except for links, brings you back to the index. I have a trigger finger, which is how I noticed it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.