Hi all,

i've heard from many that i should stop using iframes and css instead. Although, all i really use iframes for is to load a page from another site into mine. Is there a way I can do this with css? or is it something i should just stick to iframes with?

Thanks and since this is my first post - looking forward to becoming an active member of this community!

- Caroline

Recommended Answers

All 7 Replies

As far as I know, you can't do this using CSS alone.

I could be wrong, though...

you're probably right. is there a better way to load a page aside from iframes? i hear they're going to become obsolete?!

I see that iframes have been deprecated...however, I do not see an alternative.

The displaying of pages that lie outside of your Web site...whether in frames or in iframes...is severely frowned upon in the design world.

So much so, that current college textbooks on HTML suggest using the deprecated "target" tag to open the site in a new window as an alternative.

i'm only using the iframes as a design issue, the site we're loading in is also ours just on a different server. but it's good to know these points, nevertheless, thanks for your help!

CSS is never used to "load" content. It only styles the content. To dynamicaly load and/or generate content, we need to be talking about JavaScript.

It is entirely possible to load content into a DIV using JavaScript, for example, using the ".innerHTML" property.

I have spent hours trying to be nice about iframes but to no avail. I wish to load my own html documents into my index page to ensure quick loading and consistancy. Having pages reload all the time on simple basic html and css sites is the real crime these days. So why is there no direct ( as in 'just as easy' ) equivelent to iframes? This post is 6 years old and still there is no answer to this. Some of us are still having to use iframes yet others are berating us and they are using resourse hungry alternatives to this issue. Can anyone give a clear, clean working example of the alternative to iframes that noobs can understand and use? Back to more searching - there might just be a gem hidden out there somewhere.

Pages will not load any faster in an iframe than if you simply opened the page in a new tab or replaced the existing page with the new page!!!
Unless of ocurse you are only altering a few lines displayed.
The data still has to be retrieved from the server, sent to the user and rendered.
The real question is what particular need do you have to load one web page inside another web page? Can you show us an existing page and explain what happens on it?

Also, if you are just after some data from another source, there is always AJAX, although I personally have never needed it. Aprt from in prebuilt calendar systems that is, as one of my clients uses a booking service, and they can use that technique to update availablility as different days are selected.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.