w3C Validation & frameset

admin

Administrator
Staff member
I am using this on a website<br />
<br />
<frameset rows="80,*" style="framespacing:0; border:0; frameborder:0;"><br />
<br />
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.<br />
<br />
Not sure why I care about validation . . . but I am trying to conform. Anyone know how to do this?<!--content-->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.<!--content-->And frameborder is not a valid style attribute so it should be defined outside of your style definition and done like this...<br />
<br />
frameborder="0"<!--content-->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.<br />
<br />
But yes, I probably should move the frameborder, but it will not pass validation anyway.<br />
<br />
It works, obviously IE's and NS's treatment of frames is not meant to be compliant. So be it, I suppose.<!--content-->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.<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"><br />
<html><br />
<head><br />
<title>Frameset</title><br />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><br />
</head><br />
<frameset cols="30%,70%" rows="50%,50%"><br />
<frame src=http://www.webdeveloper.com/forum/archive/index.php/"frame1.html" frameborder="0"><br />
<frame src=http://www.webdeveloper.com/forum/archive/index.php/"frame2.html" frameborder="0"><br />
</frameset><br />
</html><!--content-->When I try that with the "real thing" I get borders around the frames in both IE6 and NS7.1<br />
<br />
Here is what I have - adopting what was posted above:<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"><br />
<html><br />
<br />
<head><br />
<meta http-equiv="Content-Language" content="en-us"><br />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><br />
<title>Website</title><br />
</head><br />
<br />
<frameset rows="80,*"><br />
<br />
<noframes><br />
<body><br />
<br />
<script type="text/javascript"><br />
self.location.replace('index.htm?1');<br />
</script><br />
<br />
</body><br />
</noframes><br />
<br />
<frame name="header" noresize scrolling="no" src=http://www.webdeveloper.com/forum/archive/index.php/"header.htm" frameborder="0"><br />
<br />
<frameset cols="130,*"><br />
<frame name="contents" noresize scrolling="auto" src=http://www.webdeveloper.com/forum/archive/index.php/"contents.htm" frameborder="0"><br />
<frame name="target" noresize scrolling="auto" src=http://www.webdeveloper.com/forum/archive/index.php/"home.htm" frameborder="0"><br />
</frameset><br />
</frameset><br />
<br />
</html><br />
<br />
I can make them go away by using the border and framespacing (invalid) parameters.<!--content-->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.<br />
<br />
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.<!--content-->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.<br />
<br />
Guess I will just have some "invalid" code - that works in both IE6 and NS7.1<br />
<br />
Thanks for stepping in on this :)<!--content-->
 
Back
Top