View Full Version : Importing divs?


gatiso
10-01-2005, 11:58 PM
Hi, I've got a simple CSS site with a header then a left for the menu and center for the rest. Is there anyway I can sort of "link" to the left div so that I don't have to update EVERY page whenever I want to add another link to the menu?

Heres the code for one of my pages:

<html>
<head>
<title>Frankford Plains United Methodist Church</title>
<style type="text/css">

body
{ margin-top: 5;
margin-bottom: 5;
margin-left: 5;
margin-right: 5;
padding-left: 5;
padding-right: 5;

background: #87c0f5;
<!--background-image: url(http://img258.imageshack.us/img258/9269/sky3cc.jpg);-->
background-repeat: repeat;
background-attachment: fixed;
}
font
{
font-family: Arial;
color: #000000
font-weight: normal;
font-size: 14pt;
}

#header {
margin: 20px;
padding: 10px;
height: 175px;
}
#left {
position: absolute;
left: 15px;
top: 230px;
width: 200px;
}
#center {
top: 0;
margin-left: 230px;
margin-right: 15px;
}
</style>
</head>
<body>

<div id="header">

<img src="http://img315.imageshack.us/img315/5343/fpumc6fj.gif" border="0" width="457" alt="Frankford Plains United Methodist Church" />

</div>

<div id="left">

<font face="Copperplate Gothic" size="12">
Frankford Plains United Methodist Church
</font>
<br><br>
Menu Item 1<br>
Menu Item 2<br>

</div>

<div id="center">
<div align="center">
<h2>
This weeks bulletin:<br><br>
<h2>


</div>
</div>

</body>
</html>

dolce shanti
10-02-2005, 12:00 AM
I would suggest using a PHP include. (search google or this forum for more info :))

gatiso
10-02-2005, 12:02 AM
is that the only way?

mzhao
10-02-2005, 12:05 AM
Yes, includes are your best bet.

Monkey Bizzle
10-02-2005, 02:12 AM
is that the only way?

it really isn't that hard... Lissa has a tutorial about it on on her main site:

http://www.lissaexplains.com/html6.shtml#php

gatiso
10-02-2005, 07:00 AM
alright I'll see how that goes.

gatiso
10-02-2005, 07:20 AM
It's not working.

<html>
<head>
<title>Frankford Plains United Methodist Church</title>
<LINK href="styles.css" rel="stylesheet" type="text/css">
</head>
<body>

<div id="header">

<img src="http://img315.imageshack.us/img315/5343/fpumc6fj.gif" border="0" width="457" alt="Frankford Plains United Methodist Church" />

</div>



<div id="left">

<? include("left.php") ?>

</div>


<div id="center">
<div align="center">
<h2>
Welcome to the Frankford Plains United Methodist Church<br><br>
<h2>
</div>
<table align=center width=75% border=0>
<tr>
<td width=100%>
<div align=center>
Pastor: Robyne Mayer<br>
99 Plains Road<br>
Augusta, NJ 07822<br>
Church Office: 973-702-0334<br>
Parsonage: 973-875-5643<br>
<a href="mailto:rmayer@ptd.net">E-mail the Pastor</a><br>
Service: 10:30am<br>
Sunday School during 10:30 service after Children's Message
</table>
</div>

</body>
</html>

<a href="index.html">Home</a><br>
<a href="bulletin.html">Bulletin</a><br>
<a href="events.html">Events</a><br>
<a href="scriptures.html">Scripture Resources</a><br>
<a href="message.html">Message From Pastor</a><br>
<a href="biblestudy.html">Bible Study</a><br>
<a href="scripturereadings.html">Monthly Scripture Readings</a><br>
<a href="http://www.mapquest.com/maps/map.adp?address=99%20Plains%20Rd&city=Augusta&state=NJ&zipcode=07822%2d2105&country=US&title=99%20Plains%20Rd%20Augusta%2c%20NJ%2007822%2 d2105%2c%20US&cid=lfmaplink2">Map to Church</a><br>

<table width=100% border=0>
<tr>
<td height="20" valign="top" width="140">
Pastors Links<br>
</font><select size="1" name="link" style="font-size: 8pt; color: #000000" onchange="window.location = this.options[this.selectedIndex].value">
<option>Select a link</option>

<option value="http://www.umc.org/churchlibrary/discipline/">UMC
Disciipline</option>
<option value="http://www.interpretermagazine.org/">UMC Interpreter
</option>
<option value="https://secure.umcom.org/techshop/">UMC Tech Shop
</option>
<option value="http://www.cokesbury.com/">Cokesbury</option>
<option value="http://www.christianitytoday.com">Christianity Today
</option>
<option value="http://www.cresourcei.org/">Christian Resource Inst.
</option>

<option value="http://www.umcom.org">UMC Communications</option>
<option value="http://umc.org/">UMC Home</option>
<option value="http://www.gnjumc.org/">GNJAC home page</option>
<option value="http://www.gbgm-umc.org/UMRelay/">UM Relay</option>


</option>
</select></td>
</tr>
</table>

the first file is .php and so is the second one, the second one is named left.php, so it should work...

???

gatiso
10-02-2005, 02:30 PM
anyone? I really need this fixed asap....

Monkey Bizzle
10-02-2005, 04:43 PM
Can we see a link to your site?

gatiso
10-06-2005, 12:50 AM
http://frankfordumc.org/

gatiso
10-08-2005, 09:09 PM
any ideas...? TY

Stormx
10-08-2005, 11:20 PM
<? include("left.php") ?>
should be
<? include("left.php"); ?>



...what were all the other guys on?! ;-)

mzhao
10-09-2005, 01:10 AM
Your server does support PHP, right? And PHP is installed, right?

gatiso
10-12-2005, 12:24 AM
PHP installed?