Coffeecup HTML Editor - new CSS menu...

User 1941307 Photo


Registered User
19 posts

I tried validating my site and it blew up basically. :P

I then changed the DOCTYPE to HTML 4.01 Transitional, and I got the following message...

-------------------------------------------

DOCTYPE Override in effect!

The detected DOCTYPE Declaration "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">" has been suppressed and the DOCTYPE for "HTML 4.01 Transitional" inserted instead, but even if no errors are shown below the document will not be Valid until you update it to reflect this new DOCTYPE.

------------------------------------------

I'm a little confused here, as the DOCTYPE I put in came directly from the w3schools.com website, listed as HTML 4.01 Transitional. Thoughts?

Ryan
User 463058 Photo


Ambassador
1,058 posts

You will need to post the URL to the page in question so we can see what's going on.
User 1941307 Photo


Registered User
19 posts

User 1941307 Photo


Registered User
19 posts

Try this one instead...

http://www.stpaulvaumc.org/

In addition to the DOCTYPE error mentioned above, it's giving some errors on some javascript code, which I'm not entirely sure how to fix.
User 184085 Photo


Ambassador
1,707 posts

Not exactly sure what the DOCTYPE problem is, you have;

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


this looks good to me, but one thing I noticed was in your css stpaul extra.css you have

<!--[if IE]>
<style type="text/css" media="screen">
body
{
behavior: url(csshover.htc);
font-size: 100%;
}
#navigation ul li {float: left; width: 100%;}
#navigation ul li a {height: 1%;}

#navigation a, #navigation h2 {
font-size: 1em;
</style>
<![endif]-->


my understanding is "if IE" declarations must be made in the HTML not the css, so try moving the style info to a file called 'ie-only.css" and call it with

<!--[if IE]>
<link rel="stylesheet" type="text/css" href="ie-only.css" />
<![endif]-->


in you HTML just below your normal css declaration.

eg: ie-only.css
body
{
behavior: url(csshover.htc);
font-size: 100%;
}
#navigation ul li {float: left; width: 100%;}
#navigation ul li a {height: 1%;}

#navigation a, #navigation h2 {
font-size: 1em;}


also the line #navigation a, #navigation h2 {
font-size: 1em;
needs an } at the end of it.

some info from FF error console
http://i130.photobucket.com/albums/p248/pug2775/sample-6.jpg
Volunteering to help :)
http://www.tbaygeek.ca
My HTML play area
http://www.tbaygeek.ca/test/
User 463058 Photo


Ambassador
1,058 posts

I just validated your St. Paul page, and it didn't have any problems with the doctype. Are you using http://validator.w3.org/ to check validation of your pages?
User 1941307 Photo


Registered User
19 posts

David -

Thanks a ton! The CSS validated perfectly.

Ryan
User 1941307 Photo


Registered User
19 posts

Cary -

Yes, I am using http://validator.w3.org/

When I comment out the javascript in 'index.html', then it is valid, with no DOCTYPE warning. If I leave the script alone, then I get 36 errors, 18 warnings.

???

Ryan
User 1941307 Photo


Registered User
19 posts

I fixed the errors in the javascripting. Appparently it was having issues with & in the URLs. I changed the & to &amp; and all is well.

Ryan
User 355448 Photo


Ambassador
3,144 posts

Ryan,

One thing you can do about JavaScript causing errors in validation is to remove the JavaScript code, save that code as a .js file, and then use the script tag to call that JavaScript. Since the JavaScript is external to your page code, the errors will not be there when validating.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.