Non-Newbie: How to achieve "valid" frames?

E

enickma

Hi guys,

I'm currently playing with a covers band and they want a new web site. One
of the members asked if I could "make the menu stay at the top the whole
time". So, I'm using frames. Hey, it's a band web site, not a corporate one.

Anyway, I wanted to try and hand-code the frames but when I went to validate
it, it claimed that there's no "frameborder" attribute for frameset [which
is false because it's mentioned here:
http://www.w3.org/TR/REC-html40/present/frames.html#adef-frameborder]

And it also mentions that the "border" attribute is not a valid attribute
[which is fair enough]. Anyway, I want to make the frames seem transparent
so people don't realize they're being used. What's a valid way of getting
rid of their borders?

Thanks in advance,

Nick.
 
T

The Doormouse

enickma said:
What's a valid way of getting
rid of their borders?

Copying the menu to the top of each and every page so that you do not need
to use frames will work.

Doh! *facepalm*

The Doormouse
 
D

Dan Abrey

enickma said:
Hi guys,

I'm currently playing with a covers band and they want a new web site. One
of the members asked if I could "make the menu stay at the top the whole
time". So, I'm using frames. Hey, it's a band web site, not a corporate one.

Anyway, I wanted to try and hand-code the frames but when I went to validate
it, it claimed that there's no "frameborder" attribute for frameset [which
is false because it's mentioned here:
http://www.w3.org/TR/REC-html40/present/frames.html#adef-frameborder]

And it also mentions that the "border" attribute is not a valid attribute
[which is fair enough]. Anyway, I want to make the frames seem transparent
so people don't realize they're being used. What's a valid way of getting
rid of their borders?

Thanks in advance,

Nick.

If you just used the menu at the top of the page each time, it wouldn't not
"stay at the top the whole time". HTML rarely sprouts legs and gallops down
the page.

Either copy and paste as Doormouse said or use SSI or a dynamic language to
include it in each page.
 
T

Travis Newbury

I'm currently playing with a covers band and they want a new web site. One
of the members asked if I could "make the menu stay at the top the whole
time". So, I'm using frames. Hey, it's a band web site, not a corporate one.

Why do you need frames to keep the menu at the top all the time?
 
S

Starshine Moonbeam

enickma said:
Hi guys,

I'm currently playing with a covers band and they want a new web site. One
of the members asked if I could "make the menu stay at the top the whole
time". So, I'm using frames. Hey, it's a band web site, not a corporate one.

Frames won't help you for that. Do what doormouse recommended.
Anyway, I wanted to try and hand-code the frames but when I went to validate
it, it claimed that there's no "frameborder" attribute for frameset [which
is false because it's mentioned here:
http://www.w3.org/TR/REC-html40/present/frames.html#adef-frameborder]

And it also mentions that the "border" attribute is not a valid attribute
[which is fair enough]. Anyway, I want to make the frames seem transparent
so people don't realize they're being used. What's a valid way of getting
rid of their borders?

<frameset rows(or cols)="xx,n%,*" frameborder="no" border="0">
<frame src="whatever.html" name="whatever" frameborder="no" />
</frameset>

There's still gonna be a line where the frame borders are though, sorry.

(This space reserved for the inevitable 'don't use frames' response.)
 
N

Neal

Hi guys,

I'm currently playing with a covers band and they want a new web site.
One
of the members asked if I could "make the menu stay at the top the whole
time". So, I'm using frames. Hey, it's a band web site, not a corporate
one.

Hey, you wanna make money? It's a corporate site.

Don't use the frames. They suck. Everyone will throw live bait at you.

Trust me, I'm in a rock band. I KNOW.

My first site, I did it in frames. Boy did I ever learn. I redesigned it
the hard way, pasting the navigation in on every page. Pain in the ass.

I now am developing a new design for this page where I can do half the
work, thanks to PHP.

(Gee, I'm a regular PHP spokesperson lately. You'd think it was PCP...)
 
E

enickma

Why do you need frames to keep the menu at the top all the time?

The idea was so that it would not scroll with the page. Sorry, maybe I
should've made that clearer... unless these were smartarse posts to avoid
answering the question?

Nick.
 
E

enickma

<frame src="whatever.html" name="whatever" frameborder="no" />
</frameset>

There's still gonna be a line where the frame borders are though, sorry.

Unfortunately, that code is considered "invalid" by W3C. That's what I was
asking about. Is there another way to hide the borders?

Honestly though, all you need in your code example is the frameborder="0"
and border="0" for the <frameset> element - not for the <frame> element.
Still invalid either way.

Thanks, though.
 
S

Starshine Moonbeam

enickma said:
Unfortunately, that code is considered "invalid" by W3C.
http://www.w3.org/TR/html401/present/frames.html
http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd


That's what I was
asking about. Is there another way to hide the borders?

Yes.

<frameset rows="xx,n%,*" frameborder="no" border="0">
Honestly though, all you need in your code example is the frameborder="0"
and border="0" for the <frameset> element - not for the <frame> element.
Still invalid either way.

I know. You can apply frameborder="0" to a single frame. Why you'd want
to do that, I don't know. Aesthetics, maybe.
Thanks, though.

No prob. Glad to help.
 
E

Eric B. Bednarz

Nik Coughin said:
enickma wrote:

So, to remove the borders in most browsers you need to use

frameborder="0"
framespacing="0"
border="0"

in the start tag of the frameset element and use a doctype declaration
that permits it if you want to be able to validate it. But then,
validation for its own sake is an utterly useless exercise.

Which introduces other problems than frames have; e.g. jumping to page
anchors is quite impossible (the kludge to get around that does not work
in Safari; if the content were in an overflowing box for all browsers,
Opera would not be able to jump to page anchors, Geckos wouldn't allow
keybord scrolling, although I believe that is fixed in the latest
versions, etc etc).
 
T

Travis Newbury

The idea was so that it would not scroll with the page. Sorry, maybe I
should've made that clearer... unless these were smartarse posts to avoid
answering the question?

Won't you have to scroll the frame? What you want to do is not a good
reason to use frames.

Just put the menu at the top of all the pages. If they are static, cut
and paste, if they are created with a server script, then do it with
code.

Fewer people get confused and lost when they have to scroll a page and
the menu goes away than they do when they can not bookmark your page
because it uses frames.

No one is avoiding the question, just telling you the "right" answer is
to not use frames.
 
E

enickma

Fewer people get confused and lost when they have to scroll a page and
the menu goes away than they do when they can not bookmark your page
because it uses frames.

No one is avoiding the question, just telling you the "right" answer is
to not use frames.

Okay, I know why it is not a good idea to use frames [that's why I said
"Non-Newbie" in the subject line and I mentioned that it was not my idea in
the first place].

Secondly, depending on how you do it, it is possible for users to bookmark
your "framed" pages - it just requires the use of more files.

Still, the question remains... [thanks, though]
 
N

Neal

The idea was so that it would not scroll with the page.

position: fixed; on the menu will keep it there and the rest of the page
will scroll under it... except on IE which doesn't do fixed. But then the
menu's a short slide away.

Are you afraid the user will forget it was there?
 
L

Liz

In message <[email protected]>
Eric B. Bednarz said:
So, to remove the borders in most browsers you need to use

frameborder="0"
framespacing="0"
border="0"

in the start tag of the frameset element and use a doctype declaration
that permits it if you want to be able to validate it. But then,
validation for its own sake is an utterly useless exercise.

Putting aside the issue of the use of frames altogether, are there any
frames-aware browsers in which putting frameborder="0" and border="0" would
render a page unusable?


Tx

Liz
 
S

Starshine Moonbeam

Toby said:
enickma said:
Anyway, I wanted to try and hand-code the frames but when I went to validate
it, it claimed that there's no "frameborder" attribute for frameset [which
is false because it's mentioned here:
http://www.w3.org/TR/REC-html40/present/frames.html#adef-frameborder]

If you actually *read* the document you referenced, you'll see that there
is a "frameborder" attribute for FRAME elements, but not for FRAMESET
elements.

I thought I was just reading it wrong. Why can you do it for one frame
but not all the frames?
 
R

Robert Frost-Bridges

Starshine Moonbeam wrote:

I thought I was just reading it wrong. Why can you do it for one frame
but not all the frames?

<frameset> is equivalent to <body>. You may set the borders of frames
just as you may also set the borders of divs within the body of an
ordinary html document.
 
E

enickma

Are you afraid the user will forget it was there?

As I stated in my original post, it wasn't my idea. One of the other members
of the band thinks it looks more "professional". I'm getting sick of people
telling ME what looks professional in a web site and what doesn't lol
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top