View Full Version : i-frames
ragol_67
04-09-2004, 10:05 PM
What does the W3C think of I-Frames? Are they acceptable to use? Or will they mess up the design and layout of a page on certain browsers?
mpjbrennan
04-10-2004, 03:18 PM
iframes are defined in the HTML4.01 recommendations and also in the XHTML 1.0 DTD's so I would assume that at the present moment they are regarded as OK. I have no doubt however that there will be individuals with strong views both for and against them.
patrick
lnxusr86
04-11-2004, 11:03 AM
iframes are no longer surported in XHTML 1.1 strict
There are alot of bad views about inline frames (iframes) if you want a alternative, you can use a "scrolling div" view the following example...
<html>
<head>
<title>Scrolling DIV</title>
<style type="text/css">
div.scrolling {
width : 300px;
height : 300px;
overflow : auto;
}
</style>
</head>
<body>
<div class="scrolling">
<p>Paragraph</p>
<p>Paragraph</p>
<p>Paragraph</p>
</div>
</body>
</html>
Anouther way would be to use the object tag
<object id="page" type="text/html" data="page.htm" width="500" height="600">
<p>Oops! That didn't work...</p>
</object>
The above validates as XHTML without any warnings or errors :)
Resources:
http://www.w3.org/TR/REC-html40/struct/objects.html
http://www.vortex-webdesign.com/help/dontdoit.htm - Things to avoid
lnxusr86
04-11-2004, 11:21 AM
From sitepoint.com
Frames:
Limit accessibility
Goes against the WAI recommendations
Are not in the future of XHTML in their present form
Limit your rankings in search engines as they don't reflect what you have on the site.
Iframes are not proprietary code, so non-standard.
If you want your sites to be seen on nonPC devices then frames have problems
Printing becomes a problem
Bookmarking pages becomes difficult
Multiple scrollbars appear on badly designed pages so usability is immediately effected
plus they were invented by microsoft :D
mpjbrennan
04-11-2004, 01:36 PM
Hi lnxusr86
What browsers supportbyour scrolling div? - it doesn't render in my Mozilla Firefox 0.8 (running on Red Hat 7.3)
I used to use invisible i-frames to import data into html pages, but I guess the object tag is more appropriate now.
patrick
lnxusr86
04-11-2004, 03:48 PM
Im not sure about mozilla but it doesnt work in Netscape Navigator 4.x, opera or older browsers. But the object tag as far as i know is supported by many and validates as xhtml 1.1 strict so i think thats more appropiate to use then the scrolling div or iframe.
mpjbrennan
04-11-2004, 09:38 PM
As far as I can see the scrolling div doesn't work in any browser*. It may be valid XHTML1.1 Strict but that's no consolation if no user agents currently handle it.
* Please correct me if I'm wrong
patrick
lnxusr86
04-12-2004, 11:48 AM
the object tag as far as i know is supported by many and validates as xhtml 1.1 strict so i think thats more appropiate to use then the scrolling div or iframe.
yeah.. thats why i said the object tag is better :p
gsnedders
04-12-2004, 12:21 PM
I personally use PHP includes and requires.
firepages
04-13-2004, 05:04 PM
iframes are no longer surported in XHTML 1.1 strict
... but are supported by 95%+ of your users browsers ... I know who I listen to ;)
ragol_67
04-15-2004, 02:27 AM
Thanks for all the feedback. I have decided against using IFrames, as they will bump my page lower in search results.
Josh_
04-15-2004, 03:52 AM
Using php includes with different cases combined with scrollable divs can acheive the iframe effect pretty well.
Roy Sinclair
04-15-2004, 05:17 PM
As far as I can see the scrolling div doesn't work in any browser*. It may be valid XHTML1.1 Strict but that's no consolation if no user agents currently handle it.
* Please correct me if I'm wrong
patrick
The example above needs a few more paragraphs to cause the scrolling to appear but it works in IE and Firefox/Moz and even degrades fairly well in Netscum 4.x.
mpjbrennan
04-15-2004, 05:26 PM
The example above needs a few more paragraphs to cause the scrolling to appear but it works in IE and Firefox/Moz and even degrades fairly well in Netscum 4.x.
... as I would have discovered if I had reduced the height of the div!
thanks Roy
patrick
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.