PDA

View Full Version : frameset + borders... arg!


Sergi
08.04.2002, 09:35
hi guys,

been trying to find a solution for this, if any of you can enlighten me i'd really appreciate. Otherwise i'll leave it as it is :)

Looks like w3c deleted border and framespacing from the specs. How can we delete the margins and borders around a frame now? TIA.

Example 1: following code validates but shows border. Even with the added style...
<font color=red>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>framed version</title>
<style type="text/css">
frame {
margin:0px;
border:0px;
}
</style>
</head>
<frameset cols="*, 780, *">
<frame src="wrap.html" noresize="noresize" frameborder="0" scrolling="no" />
<frameset rows="*, 310, *">
<frame src="wrap.html" noresize="noresize" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" />
<frame src="news.php" name="meddle" noresize="noresize" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" />
<frame src="wrap.html" noresize="noresize" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" />
</frameset>
<frame src="wrap.html" noresize="noresize" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" />
</frameset>
</html>
</font id=red>


Example 2: this code shows as it should but it fails to validate due to border and framespacing.
<font color=red>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>framed version</title>
</head>
<frameset cols="*, 780, *" border="0" framespacing="0">
<frame src="wrap.html" noresize="noresize" frameborder="0" scrolling="no" />
<frameset rows="*, 310, *" border="0" framespacing="0">
<frame src="wrap.html" noresize="noresize" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" />
<frame src="news.php" name="meddle" noresize="noresize" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" />
<frame src="wrap.html" noresize="noresize" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" />
</frameset>
<frame src="wrap.html" noresize="noresize" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" />
</frameset>
</html>
</font id=red>

Thanx again

cu
<font color=green>
Sergi: [url="http://meddle.dzygn.com"][site][/url:c6exzkc6bl] || [url="sergi@dhtmlcentral.com"][e][/url:c6exzkc6bl]
</font id=green>

Edited by - Sergi on 10 Apr 2002 12:24:14

Chris
08.04.2002, 17:51
i'm not too sure that there is a way round that..

my only suggestion is to not use frames, and instead use positioned DIVs, with margin controls (or a parent element with padding controls)...

//-------------{[url="http://chrispoole.com"]Chris Poole[/url:lmpssej6bz]}-------------//
the artist formerly known as fo3nix

Brian Nickel
08.04.2002, 18:05
i believe the answer would lie in css. Try things like border-width:0;

<font face='Courier New'><font color=brown>.Brian
It is best to remain silent and be thought a fool than to open your mouth and remove all doubt.</font id=brown></font id='Courier New'>

Sergi
08.04.2002, 19:11
thanx guys,

i'll keep trying. btw, i'm preparing meddle v2, and i use frames to provide popup + framed version, so user can choose. the contents are the same though. Srely the answer is in CSS, still dont know where, I just found it weird they took those two arguments from the specs, i find they're somewhat important...

thanx again.

cu
<font color=green>
Sergi: [url="http://meddle.dzygn.com"][site][/url:0udnsc86ij] || [url="sergi@dhtmlcentral.com"][e][/url:0udnsc86ij]
</font id=green>

Brian Nickel
08.04.2002, 20:06
OK, here is the description. A frame's border consists of 3 parts. The first is the frameborder, as set by the frame itself. The other 2 are the borders of the html documents, as set by html { border: ... ; }

So, the proper way to go about it is:
<pre id=code><font face=courier size=2 id=code>framepage.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html>
<head>
<title>framed version</title>
</head>
<frameset cols="*, *">
<frame src="page.html" frameborder="0" noresize="noresize" />
<frame src="page.html" frameborder="0" noresize="noresize" />
</frameset>
</html>


page.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html>
<head>
<style type="text/css">
body {
border-width: 0;
}
</style>
</head>
<body>
...
</body>
</html>
</font id=code></pre id=code>

<font face='Courier New'><font color=brown>.Brian
It is best to remain silent and be thought a fool than to open your mouth and remove all doubt.</font id=brown></font id='Courier New'>

Edited by - Sergi on 10 Apr 2002 12:23:32

Sergi
08.04.2002, 20:25
Brian,

thanx again, but no worky :(
Also tried border-width: 0px; and variations. Quite weird...

thanx again, really. If any of you can still find a workaround i'll appreciate, otherwise i'll leave the borders.... ouch. Isnt that insane?

cu

cu
<font color=green>
Sergi: [url="http://meddle.dzygn.com"][site][/url:efq4m2r360] || [url="sergi@dhtmlcentral.com"][e][/url:efq4m2r360]
</font id=green>

Brian Nickel
08.04.2002, 20:58
Time to:
A) Email the w3c.
B) Bang head against keyboard repeatedly, using results as page.
C) Give up frames.
or D) go on a murderous rampage.

<font face='Courier New'><font color=brown>.Brian
It is best to remain silent and be thought a fool than to open your mouth and remove all doubt.</font id=brown></font id='Courier New'>

mad hatter
08.04.2002, 21:35
Sergi-

You don't need to frame that page up man. I'll talk to you bout it on chat.

- David
< [url="http://www.stilleye.com"]<font color=black>s t i l l e y e</font id=black>[/url:tsoy9kx412] >

Sergi
09.04.2002, 08:02
hehe Brian, I like B... maybe i use that technique... ;)

Dave, thanx, hear you later.

cu
<font color=green>
Sergi: [url="http://meddle.dzygn.com"][site][/url:0fgzi32a67] || [url="sergi@dhtmlcentral.com"][e][/url:0fgzi32a67]
</font id=green>

paul
09.04.2002, 08:22
If you want those attributes so bad then surely the simplist way is to use an HTML DTD.

However it would still be nice to know an answer.

Which browser are you testing in?

Sergi
09.04.2002, 09:26
aha, i'll think about using the html dtd for the frameset (and xhtml for the other pages).

Still is quite weird. I tested ie6 w2k, moz095 097 099 w2k, and opera6 w2k too.

As Brian suggested, maybe I write to the w3c guys, just to see what they think about it and/or know an answer.

Thanx guys for the input.

cu
<font color=green>
Sergi: [url="http://meddle.dzygn.com"][site][/url:rqefpm1mq1] || [url="sergi@dhtmlcentral.com"][e][/url:rqefpm1mq1]
</font id=green>

Sergi
10.04.2002, 07:21
OK, no solution, really. I posted a test page here for you to see:
[url:n1f51y729b]http://meddle.dzygn.com/tests/xhtml/framed.html[/url:n1f51y729b]

I've read the specs and looks like they know about it, they say the only way to avoid borders is... using the border and framespacing attributes ... but hey! you stupid people! aren't those not included in xhtml1.0 nor html4 ??? WTF! See for yourself:
[url:n1f51y729b]http://www.htmlhelp.com/faq/html/frames.html#frame-noborder[/url:n1f51y729b] section 12.9. How do I remove the border around frames?
Note: I was directed here from w3c when trying to post the 'bug'. They said i had to read the faq's before posting, you know...

Too bad :(

I also tried to find a place to post the error, but i got lost in those 1000 pages. Any of you can help me? TIA.

cu
<font color=green>
Sergi: [url="http://meddle.dzygn.com"][site][/url:n1f51y729b] || [url="sergi@dhtmlcentral.com"][e][/url:n1f51y729b]
</font id=green>

Edited by - Sergi on 10 Apr 2002 12:26:27

paul
10.04.2002, 08:44
<BLOCKQUOTE id=quote><font size=1 face="Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>Looks like w3c deleted border and framespacing from the specs. How can we delete the margins and borders around a frame now?<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Arial, Helvetica" size=2 id=quote>

Sergi, I have just looked at the HTML 4.01 specification and these attributes have never been recommended. There are no such attributes. The W3C depricated none of the attributes in XHTML, you can still use all the attributes that ever were.

[url:9ssufxhz5f]http://www.w3.org/TR/html4/present/frames.html#h-16.2.2[/url:9ssufxhz5f]

It looks like you have buggy implimentations to blame, not the W3C's specifications.

In a compliant UA frameborder="0" would turn the borders off and marginwidth="0" and marginheight="0" would turn the margins off. These are all valid attributes under the XHTML frameset DTD.

Sergi
10.04.2002, 09:01
hi paul,

<BLOCKQUOTE id=quote><font size=1 face="Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>these attributes have never been recommended.<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Arial, Helvetica" size=2 id=quote>thanx again for the info.

Looks like we're talking different things or I still dont follow you ;)

I DO HAVE frameborder="0" marginheight="0" marginwidth="0" in my frames definition (check code), but those are allowed in FRAME, NOT in FRAMESET!:
http://www.w3.org/TR/html4/present/frames.html#edef-FRAMESET

(thanx anyway for the link, i didnt know of it and will sure be of my interest)

Also:
<BLOCKQUOTE id=quote><font size=1 face="Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>In a compliant UA...<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Arial, Helvetica" size=2 id=quote>
I tested ie6 w2k, moz095 097 099 w2k, and opera6 w2k too. I think at least ie and moz are compliant...

cu
<font color=green>
Sergi: [url="http://meddle.dzygn.com"][site][/url:lw6zcvmchc] || [url="sergi@dhtmlcentral.com"][e][/url:lw6zcvmchc]
</font id=green>

Edited by - Sergi on 10 Apr 2002 14:03:02

Edited by - Sergi on 10 Apr 2002 14:07:24