Click to See Complete Forum and Search --> : w3C Validation & frameset


Beach Bum
09-05-2003, 10:14 AM
I am using this on a website

<frameset rows="80,*" style="framespacing:0; border:0; frameborder:0;">

W3C validation does not like the spacing and borders parms and says I should use style sheets . . . but I cannot see a way to do this with a style sheet.

Not sure why I care about validation . . . but I am trying to conform. Anyone know how to do this?

spufi
09-05-2003, 12:43 PM
Frameborder should be defined within the frame and not frameset. Framespace is not a vaild attribute, but is a IE thing. You might also have to define the border properties at the frame level.

spufi
09-05-2003, 12:55 PM
And frameborder is not a valid style attribute so it should be defined outside of your style definition and done like this...

frameborder="0"

Beach Bum
09-05-2003, 02:30 PM
The problem is, without the framespace, IE does not give seemless frames. And Netscape needs the border. But framespace and border are not allowed in the W3C validation.

But yes, I probably should move the frameborder, but it will not pass validation anyway.

It works, obviously IE's and NS's treatment of frames is not meant to be compliant. So be it, I suppose.

spufi
09-05-2003, 08:48 PM
Are you talking about having frames with no borders showing for either browser? Here's the copy of code I did and I ran it through the validator. Granted it's a basic example.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Frameset</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<frameset cols="30%,70%" rows="50%,50%">
<frame src="frame1.html" frameborder="0">
<frame src="frame2.html" frameborder="0">
</frameset>
</html>

Beach Bum
09-05-2003, 11:38 PM
When I try that with the "real thing" I get borders around the frames in both IE6 and NS7.1

Here is what I have - adopting what was posted above:

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

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Website</title>
</head>

<frameset rows="80,*">

<noframes>
<body>

<script type="text/javascript">
self.location.replace('index.htm?1');
</script>

</body>
</noframes>

<frame name="header" noresize scrolling="no" src="header.htm" frameborder="0">

<frameset cols="130,*">
<frame name="contents" noresize scrolling="auto" src="contents.htm" frameborder="0">
<frame name="target" noresize scrolling="auto" src="home.htm" frameborder="0">
</frameset>
</frameset>

</html>

I can make them go away by using the border and framespacing (invalid) parameters.

spufi
09-07-2003, 07:36 PM
Now that I have a firm grasp of what you what, I don't think there is a valid way of doing what you want to. I'm surprised that the W3C didn't allow something like IE uses to be able to control that aspect of frames. I think I have on the rare instance left invalid code in when I personally thought that what I was doing was logically the correct way of doing something. Not that I still don't try to have a valid page, or anything.

My question is, why are you using frames at all. If it's to allow you to only change a section of a page and then have it affect every page on your site, then I would use a sever side technology to do it if your host allows it.

Beach Bum
09-07-2003, 10:26 PM
In this instance, I am trying to have a portable site (that can be carried and executed in a variety of environments) so I cannot rely on server side anything.

Guess I will just have some "invalid" code - that works in both IE6 and NS7.1

Thanks for stepping in on this :)