Need an iframe in center div container

grin1dan

New Member
Noob here, Hello All, I have a site with header, left and right panes and footer. I have a list of links on the left pane. I would like the user to be able to click on a link and the appropriate page open in the center container. I have tried an iframe link but when I posted the page there the iframe page was already opened in the left frame. Please advise, TIA.
 

arminium

New Member
set your page up like the below example, you can include a file at each div, so for menu make a file menu.php and in the menu div is just put
PHP:
<?php include 'menu.php'; ?>
and same with header and footer so each page only have to edit the stuff in right div and update your menu to include each page(assuming your right div is your body)

if you know php the cleanest way to do it is to have a index page
then include, a header, a footer and menu, and use a get variable to load the body content, and if your really clever clean it up with .htaccess mod-rewrite, thats more or less how cms is made statically, if you want it to be dynamic you just create your pages in a datebase with feilds for your meta data and title etc, and then you can use a while() loop in your menu to dynamically create the menu, but thats starting to get more complex now

HTML:
<style>
<!-- set your div styles -->
#header{
position:absolute;
width:200px;
hieght:whateva;
margin:wateva;
}

etc etc
</style>

<body>
<div id="page">

<div id="header">
header stuff here
</div>

<div id="left">
left stuff here( most likely menu)
</div>

<div id="right">
right (i assume body stuff here)
</div>

<div id="footer">
Footer stuff here
</div>

</div> <!-- close the page div -->
</body> <!-- close body div -->
 

grin1dan

New Member
Thanks Arminium! I need to master php sounds like. Would you agree that it is the choice for building websites? Anywho...I found that I only needed to reference the iframe object as target from any where and it would open in center page. Thanks again, Dan.
 
Top