Frames and Validation Issue

Ok, here's my problem. I am creating a frames website for a project in one of my classes for school. The issue is that I cannot get the W3's validator to validate my framset page for some weird reason. I'm pretty sure the code is right except for the document type definition which may be wrong. According to my professor, for some reason the book I have has the wrong code for it. Any ideas on how to get it to validate(or do I need to really worry about that)? The code works minus the validation issue.

Here is the source code for the frameset:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD/XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Site Title</title>
</head>
<frameset rows="10%,90%">
<frame src="header.html" id="header" name="header" noresize="noresize" />
<frame src="home.html" id="content" name="content" />
<noframes>
<p>Your Browser doesn't support frames, buddy!</p>
</noframes>
</frameset>
</html>

If I didn't have to use frames(or tables) for this project I honestly wouldn't. I loathe them both.
 
Well, you don't say what the Validator is reporting.

However, this is the Frameset header as shown on W3.org:
Code:
        <?xml version="1.0" ?>
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
                              "XHTML1-f.dtd" >
        <html xmlns="http://www.w3.org/TR/1999/REC-html-in-xml"
              xml:lang="en" lang="en" >
        ...
        </html>
 
GilesGuthrie
However, this is the Frameset header as shown on W3.org:
Code:
        <?xml version="1.0" ?>
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
                              "XHTML1-f.dtd" >
        <html xmlns="http://www.w3.org/TR/1999/REC-html-in-xml"
              xml:lang="en" lang="en" >
        ...
        </html>
Bad, bad Giles. ;) The link to the DTD is different, because the W3C can use relative URLs, since the DTDs are on their servers – everybody else has to use absolute links though, which Matrix did correctly. However, I do believe that it must be an error in the DOCTYPE, because the Validator is spitting out a "frameset element undefined" error, meaning that it doesn't even recognize the frameset tag.
 
Sage
However, I do believe that it must be an error in the DOCTYPE, because the Validator is spitting out a "frameset element undefined" error, meaning that it doesn't even recognize the frameset tag.

Yep, that seems to be the issue, I think.

EDIT:I found the problem... I had an extra "/". Sheesh.

Here is the DTD from a file my professor gave me with the incorrect DTD with the extra slash in red.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD[color=red]/[/color]XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

and here is the correct DTD without it.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

What I don't seem to get is why in other documents I've created with the DTD with the extra slash the validator never caught it until now.

W3C's list of valid DTD's
 
Ok, now that I solved that problem with my frameset validation issue, I have a minor CSS problem. Apparently when I try to make a relative link to a section of a document, the heading that I have linked to changes to my active hover state upon running the mouse over it. Is there anyway around this in CSS? Here is what I have for my linking states in my CSS:

Code:
a {
	text-decoration: none;
	background-color: transparent;
	outline: none;
	}
a:link {
	color: #ffcc00;
	text-decoration: underline;
	}
a:visited {
	color: #990000;
	text-decoration: underline;
	}
a:hover {
	color: #ff6600;
	text-decoration: underline;
	}
a:active {
	color: #ff6600;
	text-decoration: underline;
	}

If need be I can upload the document to my webserver space if you need to see what I am referring to.
 
Yeah, I really don't know what you mean. In the meantime though, I can clean up your CSS… ;)

Code:
a {
	color: #fc0;
	text-decoration: underline;
	}
a:visited {
	color: #900;
	}
a:hover {
	color: #f60;
	}

You don't need a:active if it's no different from a:hover. Also, you won't need outline: none unless you specified an outline for inline-level elements elsewhere. Its browser support is really sketchy anyway. Likewise, you don't need to specify a background attribute unless you're overriding a previous inline-level specification (in which case transparent would be worthless anyway).
 
Sage
Yeah, I really don't know what you mean. In the meantime though, I can clean up your CSS… ;)

Code:
a {
	color: #fc0;
	text-decoration: underline;
	}
a:visited {
	color: #900;
	}
a:hover {
	color: #f60;
	}

You don't need a:active if it's no different from a:hover. Also, you won't need outline: none unless you specified an outline for inline-level elements elsewhere. Its browser support is really sketchy anyway. Likewise, you don't need to specify a background attribute unless you're overriding a previous inline-level specification (in which case transparent would be worthless anyway).

Ok, let me upload it to my webspace. As for the messy code, well, that's a section of it from the CSS(modified, of course) off of Little Boxes. I'm basically redesigning my website with frames for a project for school. It won't be online but if the finished product turns out nice I'll modify it for my current site(without frames or tables) and update that.

EDIT: I think it was a:active causing it... It was. It's gone now. Thanks for pointing that out. As for those text-decoration: underline under my link states except "a", well, I want those because I don't want relative linked headings to be underlined but I do want links to be underlined.
 
Oh, that's a very easy issue to solve. Use ID anchors. Instead of this:

Code:
<h1><a name="bionc">BIONC SETI@Home Team</a></h1>

Use this:

Code:
<h1 id="bionc">BIONC SETI@Home Team</h1>

Cleaner, more semantic, gets rid of that :hover issue, and can be attached to Javascripts if needed, and all in all infinitely better than those hideous "name" anchors. ;) And yes, it'll work exactly the same.
 
Sage
Bad, bad Giles. ;) The link to the DTD is different, because the W3C can use relative URLs, since the DTDs are on their servers – everybody else has to use absolute links though, which Matrix did correctly. However, I do believe that it must be an error in the DOCTYPE, because the Validator is spitting out a "frameset element undefined" error, meaning that it doesn't even recognize the frameset tag.


I didn't steal it off the source, I stole it off a page that said "This is what you need to put in a Frameset document".

So, Bad, bad W3C!!
 
Back