The majority of forums are now only available as archives, which means posting/editing is disabled.
The Anything and Everything forum is still open.
The Anything and Everything forum is still open.
iFrames - Good or Bad?
|
|||
|
Rank: ? (117)
Member #: 7875 |
What are your opinions on iFrames? In theory I think they're terrific, but I don't know very much about their compatibility with browsers other than IE. I'm currently conceptualizing a site that would need extensive iFrames, or at least several scrollable areas within the site. Are there different ways to do this other than iFrames? Are iFrames good or bad? Your thoughts would be appreciated!
_______________________
AIOFREAK
|
||
|
|||
|
|||
|
Rank: ? (172)
Member #: 8641 |
I've used iFrames in many different layouts for my site.
Some compliants I got when I used them was: 1. Pages didn't load 2. Site download time is too long 3. Confusing navigation As far of another way I'm not really sure, but I seen somewhere in the PHP section I thing on how to use tables with scrolling. I'm not sure if its possible but I think I read that somewhere. Anyways now I don't recommend using iFrames unless it would be for something like previewing and image thumbnail. ex. an image gallery with text links to thumbnails
-TwiztedFake-
|
||
|
|||
|
|||
|
Rank: ? (4827)
Member #: 3416 |
i think most newer browsers handle iframes okay, but yes there certainly are other ways to handle it. you can use css to define an area of a certain size that will have scrollbars if necessary, and then you just include the code you want inside that element. you can use php or ssi for the includes, or you could call a javascript that would print out the html. if you want to try that instead of iframes, there are plenty of people here who would be able to help you set something up!
my mind is like a steel trap! it only hangs on to the big stuff. visit my forums at track7.org
|
||
|
|||
|
|||
|
Rank: ? (168)
Member #: 8368 |
i personally try and make my webpages compatible to all browsers - that is good coding and nothing extra special
and i believe that iFrames do not work wonderfully well in browsers other than IE, so i would suggest you not to use them especially if you are making a business site, but if you are only making a personal site, then you could probably consider using iFrames as it will make many things simpler! in the end its your choice as you are the webmaster :P
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." Albert Einstein
|
||
|
|||
|
|||
|
Rank: ? (1045)
Member #: 2150 |
To have a scrollbar, you could use css to do this. The css function overflow: auto or overflow: scroll creates a scrollbar if the content in the item exceeds it given width and height (here 100x100px).
Code:
You could put the css in a stylesheet file if you want to. Look at w3schools for more information and examples.
"Your coding is godly, Mav. Stop watching porn and do something with your life!" -.- (Farley)
|
||
|
|||
|
|||
|
Rank: ? (383)
Member #: 867 |
You guys have said pretty much all I'd say to aiofreak in reply to his post, but I do have something to add.
Iframes are compatible only in the latest browsers, so they're even worse than frames. Don't use them. Use CSS as MavDude showed you if you want to make scrollable areas.
This comment is copyright by Dino (http://dino.shiftedphase.com/) and may not be reproduced without written permission of the housing authority, the Senate, the United Nations, my neighbour's dog, the grocer and the guy who just jumped off the bridge
|
||
|
|||
|
|||
|
Rank: ? (117)
Member #: 7875 |
Okay, so we've got some major opinions about iFrames here
_______________________
AIOFREAK
|
||
|
|||
|
|||
|
Rank: ? (1045)
Member #: 2150 |
No problem
But I think Iframes aren't all that bad, exept if you use a really old browser. For example, I had a shoutbox on my site that was in a Iframe. Now if the visitor has an old browser that can't show Iframes, then the visitor would see a link that would open the shoutbox in another window. Not the most ideal option, but for things like shoutboxes which usually come in an Iframe the best way to go. Here's the code I used. Code:
The link "view the shoutbox" would only display on those browsers that don't show Iframes. But if you only need a scrollbar for texts, I suggest the css method.
"Your coding is godly, Mav. Stop watching porn and do something with your life!" -.- (Farley)
|
||
|
|||
|
|||
|
Rank: ? (3049)
Member #: 265 |
i'm using ie 6.0 but i don't know why the pages don't load into the frame....i set it as a target and got everything names accordingly but still it loads into a new window....what's wrong?
<Farley> or think of me in a micromini thong
<Jester> my willy died
|
||
|
|||
|
|||
|
Rank: ? (383)
Member #: 867 |
MavDude
if the visitor has an old browser that can't show Iframes, then the visitor would see a link that would open the shoutbox in another window
I still think an alternative method is more practical. Why not use a CSS scroll area and use PHP to include the shoutbox? Something like this: <div style="width:135px; height:135px; overflow:scroll;"> <?php include("shoutbox/viewshoutbox.php" </div> Then everyone would be happy. retarded i'm using ie 6.0 but i don't know why the pages don't load into the frame....i set it as a target and got everything names accordingly but still it loads into a new window....what's wrong?
You didn't use target="_blank", right? Can you show us the site or the code?
This comment is copyright by Dino (http://dino.shiftedphase.com/) and may not be reproduced without written permission of the housing authority, the Senate, the United Nations, my neighbour's dog, the grocer and the guy who just jumped off the bridge
|
||
|
|||
|
|||
|
Rank: ? (1045)
Member #: 2150 |
Dino
I still think an alternative method is more practical. Why not use a CSS scroll area and use PHP to include the shoutbox? Something like this:
<div style="width:135px; height:135px; overflow:scroll;"> <?php include("shoutbox/viewshoutbox.php" </div> Yeah if I could do that somehow.. I've already tried but ran into several problems, it uses it own stylesheet.. and in a div the content suddenly is all weird aligned etc.. blah.. it's just easier in an iframe hehe. Maybe I'll try again later. And to retarded: I think you have to give the iframe a name and do target="name" before it gets loaded in the Iframe.
"Your coding is godly, Mav. Stop watching porn and do something with your life!" -.- (Farley)
|
||
|
|||
|
|||
|
Rank: ? (383)
Member #: 867 |
You don't have to use a DIV, you can use a <p>aragraph or something. And you can always adapt the CSS to work well (for example, use an internal stylesheet for your page and use the shoutbox's stylesheet for the shoutbox).
This comment is copyright by Dino (http://dino.shiftedphase.com/) and may not be reproduced without written permission of the housing authority, the Senate, the United Nations, my neighbour's dog, the grocer and the guy who just jumped off the bridge
|
||
|
|||
|
|||
|
Rank: ? (4827)
Member #: 3416 |
Dino
use an internal stylesheet for your page and use the shoutbox's stylesheet for the shoutbox
how would you do that if the shoutbox is included via php? for example, what if you had div.date defined differently for the page and the shoutbox? if there's no overlap then you can just include all the css for the whole page, but i don't know what you would do if there was overlap, other than rewrite one of them so there isn't.
my mind is like a steel trap! it only hangs on to the big stuff. visit my forums at track7.org
|
||
|
|||
|
|||
|
Rank: ? (1045)
Member #: 2150 |
yeah.. well it is possible to include several stylesheets on 1 page so.. it is all possible, but the hassle is just too much hehe :[
"Your coding is godly, Mav. Stop watching porn and do something with your life!" -.- (Farley)
|
||
|
Please login or register to post a reply.
