DIV vs FRAMES

What are the advantages of each

Page 1 of 1

2 Replies - 46115 Views - Last Post: 27 May 2006 - 02:46 AM

#1 im@geek  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 94
  • Joined: 18-February 05

DIV vs FRAMES

Posted 26 May 2006 - 12:56 PM

I have designed pages using nothing but framessets, and once I learned CSS, I started designing pages with nothing but divs. In my experiance so far, divs seem to much cleaner and more preditable acrossed multiple browsers. I am still very much a newbe and want to learn as much as possable. What are the key differences between divs and framesets, and when should I use them?

Here are my sites:

All Framesets - I have redesgned this page using only divs and it is much cleaner

All divs

Is This A Good Question/Topic? 0
  • +

Replies To: DIV vs FRAMES

#2 William_Wilson  Icon User is offline

  • lost in compilation
  • member icon

Reputation: 205
  • View blog
  • Posts: 4,807
  • Joined: 23-December 05

Re: DIV vs FRAMES

Posted 26 May 2006 - 07:40 PM

divs are a form of layering, which are much more universal than frames, though rare.. frames still do have their place if well managed. A frame style can be harder to implement with css and divs, but it will have a more easily modified base, as the layers can simply be applied on top of each other, instead of re-writting the ordering of the frames.
Was This Post Helpful? 0
  • +
  • -

#66 Arbitrator  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 51
  • View blog
  • Posts: 530
  • Joined: 26-January 05

Re: DIV vs FRAMES

Posted 27 May 2006 - 02:46 AM

The main differences are that frames can load other resources using purely HTML; this includes presenting resources external to your website while keeping them at your own website. Drawbacks include a static URL in the address bar and thus increased difficulty to bookmark specific pages; even if you do bookmark them, when you go to them the page will be presented outside of the intended frameset unless you use some kind of script. It's also understood that frames affect search engine optimization (SEO) because, since the contents are independent of one another, seach engine spiders have great difficulty of making sense of the content and indexing it; in addition, if a search engine delivers a user to your site, it will likely be without the frameset without a script meaning that you need to put navigation links on every page to ensure that users can get to the rest of your site as they might have scripts disabled.

Page divisions on the other hand can serve local content in the manner of the frames but that content is not actually independent of the page (what would be the frameset). In other words, if you don't control the content, you can't put it in a div. Divisions, as stated, are also a form of layering that can have far more styles applied to them, re-positioned, hidden, et cetera with many more robust display capabilities and purposes than frames. Using the position: fixed CSS declaration one of the desired effects of frames: static content such as navigation, headers, or advertisements. Of course, when you click a link, all of this static content will reload, so you don't get the decreased bandwidth usage that frames allow for by only reloading content that is actually new. For that you need to use an iframe but it has the same drawbacks as frames. The other desirable point of frames was the ability to have a single navigation, for example. Through this, updating one navigation page would effectively update the navigation for the entire website; an easy, pure HTML solution for novices. However, you can achieve the same effect with server-side includes (SSI) or other scripting if your host supports it.

Summary: Avoid frames unless you don't care for allowing users to bookmark your page or search engine rankings. They might be useful if you're giving a web-based presentation and don't want to use something like PowerPoint, or want to have something like static background music playing without the drawback of pop-up blockers or need for streaming media, but for general web use they have too many drawbacks. As well, use page divisions for layout and avoid tables for this purpose when at all possible.
Was This Post Helpful? 1

Page 1 of 1