Frames or CSS Divs or what?


#1

A website that I’ve been asked to fix up is built with HTML using frames. When the user clicks on a menu selection, the ‘main’ frame gets the referenced html file.

How would you go about this using PHP? Would you still use frames or a CSS div? I understand that I could call a PHP page that would reload the whole thing from a tempate, but I would rather just fill in the center section and leave everthing else alone.

Thanks.


#2

Do you actually need PHP? By the sounds of it you are just trying to recreate a page of HTML using PHP. To answer the question… You would do it in PHP pretty much the same way as you do in HTML. You just need to echo out the HTML and perhaps throw in your dynamic content.

In fact you can intermix the HTML and PHP together. When you need a section of PHP you just enlcose the needed section in the <?php and ?> tags and then do everything else in HTML.

Hope this helps.

Paul


#3

This is pretty much the conclusion that I’ve come to. However, the other side of my question has to do with CSS vs frames. I know how to address a link to a target frame, but is there a way to do the same with a CSS defined div?

Perhaps this is the wrong forum for this.

Thanks for taking the time to write back.


#4

CSS is for stylesheets (Cascading Style Sheets). It has nothing really to do with frames.

Within the target fram you make a reference to the appropriate stylesheet such as the following

<link rel="stylesheet" type="text/css" href="./stylesheet.css">

If you have that (adjusted for your particualr stylesheet) in the page that is targetted for a particular frame, then you should be ok.

If you are using the DIV’s then that is within a single page (not necessarily in a frame) and again, the stylesheet could be applied in the same way.

Good luck Hope this helps.

Paul


#5
CSS is for stylesheets (Cascading Style Sheets). It has nothing really to do with frames.

Yes, I understand what CSS is and what frames are. I know how to specify a target frame wherein the referenced link will appear, replacing the current content. What I’m wondering, and perhaps this is not the right forum for this question, is whether or not there is a way to address a CSS div in the same way, replacing its content with the content of a referenced link without resending the entire page?