...

View Full Version : problem inserting external php file



OGGordon
11-05-2009, 08:51 AM
Hey guys,

I finally figured out how to create my layout in a nicely organized way and everything seems to work fine except that for the header part, I want to include the file "header.php" so I could modify the header.php instead of the index.php, however im having a hard time getting things to look the way i want to. when I add the file, it pushes the entire layout to the left instead of staying centered.

this is the code i put in the index file:


<?php include("header.php"); ?>


here you can see how it looks like:
http://derderder.cwsurf.de/

any help appreciated!

abduraooft
11-05-2009, 08:57 AM
<div id="header">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Unbenanntes Dokument</title>

<style>
#top-wrap { width: 960px; height; 149px; align: center; }
#header { width: 960px; height; 85px; align: center; }
#nav { width: 960px; height; 69px; align: center; }


</style>
</head> You shouldn't make your individual files with complete html structure. The structure is required only for the final page source after parsing all php code

OGGordon
11-08-2009, 07:53 AM
I'm not sure what you mean. Could you elaborate please?

abduraooft
11-08-2009, 11:44 AM
Take a look at your generated html source code taken from browser's "view source" option.

OGGordon
11-08-2009, 11:49 AM
Take a look at your generated html source code taken from browser's "view source" option.

hey i just realized that i used the wrong file to for the header.php and mixed up codes. that's why I was confused. i was doing too many things at a time and didn't realize that I what I was doing was complete nonsense. thanks :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum