Forum Moderators: phranque

Message Too Old, No Replies

Layers and Frames

is there a difference?

         

sadierae

7:30 pm on Aug 7, 2002 (gmt 0)

10+ Year Member



Okay I was posed a question to find out what the difference between layers and frames are?

Does layers have something to do about building a site (and functioning) like frames but it's made in layers. If anyone one has any idea what I'm talking about, I would love an explination.

knighty

1:28 pm on Aug 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Frames hold pages

Layers hold content within pages

sadierae

1:47 pm on Aug 8, 2002 (gmt 0)

10+ Year Member



Thank you! So if someone said they are creating a site with layers essentially they are creating a framed site, right? Just want to make sure I read you correctly!

Knowles

2:30 pm on Aug 8, 2002 (gmt 0)

10+ Year Member



No these are not the same, they could possibly make them look the same with JavaScripts but they are not the same. A framed page has a <frameset> where as a page with layers does not need a <frameset> it just has its <layer> tags (I think its <layer>)

Sinner_G

2:35 pm on Aug 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Besides, with layers you have the possibility of having some elements 'fly' over the rest of the page. Like menu items. Or a navigation which would stay at the bottom of the visible part of your page, even when you scroll up or down.

knighty

3:34 pm on Aug 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A frame is just like a picture frame - the picture being a web page.

A web page is constructed using various HTML elements, a layer is just one of these elements you can use to build a web page.

gsx

5:29 pm on Aug 8, 2002 (gmt 0)

10+ Year Member



A frame (or frameset) is one page that does not have it's own content. Its purpose is to divide the screen into smaller parts and each part is assigned a different page. A common usage would be for index.html to call content.html to the right hand side of the page and navigation.html to the left hand side of a page. Thus a frameset requires multiple files to construct.

A layer is one page (in one file) that has sections separated by layers. The layers can be on top of each other. Using JavaScript (or maybe other code) each layer can be hidden or made visible. This could be used to store many pages into one page, however the download time would be downloading content that the user may never visit. More common usage would be for mouse over effects, where long text descriptions or graphics appear elsewhere on a page when you mouse over a link.

Both have very, very useful purposes. Both have severe disadvantages. You need to be aware of disadvantages before you decide to use them.

mivox

5:40 pm on Aug 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The <layer> tag is also a proprietary Netscape tag that really shouldn't be used for anything. To get a layer-like effect, a CSS-positioned <div> will provide cross-browser compatibility and W3C standards compliance.

For layers/divs, imagine a sheet of paper layed out with a collage... each piece of the collage is a separate <div>/<layer>, and you can arrange the collage pieces however you like, but they are all part of the same page.

For frames, imagine one of those hinged two-photo photo frames. The double-photo frame is your frameset file, and each photo is a separate html file being displayed in a separate frame within the frameset.

sadierae

6:11 pm on Aug 8, 2002 (gmt 0)

10+ Year Member



Oh wow, okay I think I got it. But a framed site is a hindrance for SEO purposes, so what about layers? Any problems regarding SEO?

mivox

6:22 pm on Aug 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try a site search (the link is at the top of the page...) for CSS. Using CSS for your page layout can actually be a help for search engine ranking, because you can keep all your layout code in an external CSS file, which leaves your .html page code with a maximum content-code ratio. Gives the SE spders more content with less fluff.

JayC

6:44 pm on Aug 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Mivox is absolutely right about using <div> with CSS instead of <layer>, but I'd point out, sadierae, that the person who asked you that question may not have specifically been referring to that undesirable <layer> tag. Many people use the term "layers" to refer sort of generically to the use of either the <div> or <layer> tags.

So my point is that if, as you said, "someone said they are creating a site with layers," they may actually be using <div> -- if that makes sense.

BlobFisk

8:52 am on Aug 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Layers can be used to you advantage for SEO. The order in which layers are called within the html code is not related to where they appear (assuming that you are using absolutely positioned layers).

This means that the first layer called can be your content layer, which when your site gets indexed the search engine sees the content first (as opposed to navs and headers) and this can help to get you a higher ranking...