CSS I-frame?


I have a site set that is fully CSS-ed in terms of layout. Now i’m turning to content. Is there anyway to create a ‘CSS i-frame’, so that I don’t have to load what basically is a copy of one page with different text/images? Or perhaps a script of some kind that changes the contents of a div?

Cheers folks,



You can create a scolling area with CSS by adding

overflow: auto;

to whatever division you are gonna use for the content, but there is no way (at least that I know of) to actually create a frame with CSS.

You could however place an iframe within that division.

Hope this was useful


Is what you’re askin, if there is a way to load a page into a div much like you load a page into an iframe? If so, there isn’t a way to do it. There may be some kind of javascript or dhtml that will allow you to do it, but just straight CSS won’t let you.

Basically yes…I’ll look into some JS for it I think. Cheers guys.

you could also look into some server side scripting, that might save time in the long run.

Technically, this IS possible…

You’d use dynamic HTML (dHTML) and basically define a file with all the different contents that you would want to display in it or maybe keep them in a database.

Then, just assign a piece of PHP function that would accept different variables from your different buttons, call the relevant information from the database or text file depending on which button name was passed through the function and insert that retrieved info into your DIV or whatever it is.

This is all a bit over the top but it would be a good experiment to learn (or extend) your XML skills if you choose that method as XML is a good thingn to stick on your CV.

Hmmm…any chance of hand with that? I’ve done some programming but I’ve never used PHP before. And would it allow me to say, make a page in Dreamweaver, then just load that up?

I’d really love to but unfortunately, I really don’t have the time for it at the moment.

Try checking out www.webmonkey.com , part of the Lycos network, it’s got loads of tutorials and features on PHP, MySQL and Access databases (which you might need) and some handy XML tips.

If you REALLY want to stretch it or basically just adjust and improve the way you tackle future web projects, you might want to buy a book. I recommend “MySQL and PHP Web Applications” or just check out Amazon for some of their recommendations.

Good luck with it all and hopefully I can help you out with specific parts once you get up and running. I’m sorry I can’t help you set the whole thing up from the beginning though.

Well if you really want to do it w/ CSS and DIVs all you really have to do is make lots of layers and call them as visible and hidden depending on what you’re clicking. That would be quicker I think than the PHP and dHTML thing if you’re not familar w/ it.

Yeah, that’s not a bad idea but I think it would totally mess up the alignment of the rest of your page not to mention cross-browser problems.

I THINK that Netscape is the only browser that supports layers which leaves that huge percentage of Internet Explorer users screwed! Not something you want considering that everyone uses Windows and it comes with IE installed already.