Click to See Complete Forum and Search --> : frames vs divs
Icedfuse
09-30-2008, 04:03 PM
obiously when it comes to divs vs tables, we want to phase out tables and go with the div.
but what about frames vs divs? can divs be used to phase out frames?
the benefit of frames is that they can be used to isolate portions of a website to allow different loading for different sections. For example as a user clicks through a website, certain areas do not have to reload every time.
this cannot be done with divs? unless this could be done in accordance with javascript, whereby this post would be appropriate for the javascipt forum.
felgall
09-30-2008, 04:54 PM
Once Internet Explorer starts supporting the <object> tag properly then all <iframe. tags will be able to be replaced with object tags. You can do it now provided that you don't mind that IE doesn't allow you to turn off the border around the object.
tracknut
09-30-2008, 09:02 PM
obiously when it comes to divs vs tables, we want to phase out tables and go with the div.
Obvious to you maybe, but not me!
but what about frames vs divs? can divs be used to phase out frames?
the benefit of frames is that they can be used to isolate portions of a website to allow different loading for different sections. For example as a user clicks through a website, certain areas do not have to reload every time.
I don't know for sure on the technology, but I would hope a smart web proxy/cache would be able to do this, with divs. I don't know if it is now done, or is easy, but it seems to me that would be the place for this to be done.
Dave
svidgen
10-01-2008, 12:38 AM
obiously when it comes to divs vs tables, we want to phase out tables and go with the div.Really?
"Web 2.0" developers got into this big fuss over using DIVs instead of tables. If I had to guess what they spend most of their time doing, I would say, "reinventing tables." When you want a table, just use a table. It's faster to implement, more likely to be cross-browser compatible, and the code is probably even smaller.
but what about frames vs divs? can divs be used to phase out frames?Sure. Some developers call it AJAX. Though some of us were doing this before the term AJAX was even coined ... The new conventions are usually just old hacks with a shiny new name.
Usually, it's best not to think of things as phasing other things out (a rare few things OK to delete forever). It's about using the right tool for the job. Most conventions don't really have a need to be phased out. They're generally "replaced" by something that's more specific or less specific. In either case, there's often still good reason to keep the old tools around.
In the case that the replacement is more specific, it's often useful to use the old convention when you want something slightly different than what the new tool offers. It's sort of trivial to speak of an example, but here's one anyway: IFRAMES will probably never replace DIVs, because sometimes you don't want the functionality that an IFRAME offers--you just want the DIV.
See how trivial it was to mention that example?
In that case that the replacement is less specific, you end up wasting a lot of time by using it if what you really want is the old thing. There are a lot of great examples of this in DIV developer's pages. They create a two or three column layout with a barrage of DIVs and CSS. In the end, the result would have been the same by using a really simple, very easy to implement, one-row, three-column table, with as little additional CSS as you want.
So ... phasing things out? Don't speak of such horrors! If you want to talk about adding more tools, that's great. But think twice, thrice, etc. before speaking of phasing anything out.
felgall
10-01-2008, 02:03 AM
It isn't tables vs divs anyway - it is meaningless HTML tags vs semantically meaningful HTML tags. You should use the tags that best describe what they contain. The <table><caption><thead><th><tfoot><tbody><tr><td> tags are intended for marking up tabular data and they are the correct tags to use to do that.
Once support for IE7 and earlier drops low enough the CSS table commands will then be usable for laying out web pages table style without needing to use the HTML table tags because all modern browsers support CSS tables (including IE8). The display:table, display:table-row and display:table-cell CSS commands are the correct way to do page layout using tables (except that IE7 and earlier don't support them)
JavaScript/Ajax can be used to update any part of the web page dynamically - not just divs.
svidgen
10-01-2008, 09:27 AM
The display:table, display:table-row and display:table-cell CSS commands are the correct way to do page layout using tables (except that IE7 and earlier don't support them)
Tables have these stylings applied to them by default. It's absurd to create a more general object and style it to act like an object that already exists. Ever heard the phrase reinventing the wheel?