Hi,
I am trying to code my website so that it will use a template for every page. I used a web-builder tool originally to make the site, but ran into problems with it because it encrypted my index page so that I could not edit the code. So I am trying to rebuild everything so that I can freely edit the codes of my various pages.
I am having a hard time making it so that the content of the page shows where I want it to…
My Website: www.wubbiepets.com/atest/index2.php
So you can see where I want the content to show… however, down at the bottom where it says “Content?” is where the content is actually showing up. Here is the code to the template I am using:
<?php include('variables/variables.php'); ?> /* Design by Free CSS Templates http://www.freecsstemplates.org Released for free under a Creative Commons Attribution 2.5 License */ body { background-image:url("/images/backgroundimg1.png"); text-align: justify; font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; font-size: small; text-align: justify; color: #555E4F; } h1, h2, h3, h4, h5 { margin: 0; } /* Header */ #header { width: 700px; margin: 0 auto; color: #808080; } #header h1 { float: left; margin: 0px 0 0 0px; font-size: 50px; letter-spacing: -7px; } #header h2 { float: right; margin: 40px 20px 0 0; font-size: 18px; letter-spacing: -2px; } a { color: #666666; text-decoration: none; } a:hover { color: #555E4F; text-decoration: none; } /* Menu */ #menu1 { float: left; width: 160px; margin: 0px auto; padding-bottom: 20px; text-transform: uppercase; font-weight: bold; font-size: 14px; color: #323B2E; } #menu1 ul { margin: 0px; list-style: none; padding: 0px; } #menu1 li { } #menu1 a { display: block; width: 190px; padding: 15px 0px; background-color: #D9D9D9; border-top: 1px solid #EDEDED; border-bottom: 1px solid #B5B5B5; text-align: center; text-decoration: none; text-transform: uppercase; font-weight: bold; color: #808080 ; } #menu1 a:hover { background-color: #8A8A8A; border-top: 1px solid #E3E3E3; border-bottom: 1px solid #E3E3E3; color: #FFFFFF; } /* Content */ #content { width: 700px; margin: 0 auto; padding-top: 10px; border: 10px solid #FFFFFF; border-top: none; background: #E9EAE2; } #colOne { float: left; width: 190px; margin-top: 20px; padding: 0 10px 0 20px; } #colTwo { float: right; margin-top: 20px; width: 440px; padding: 0 20px 0 20px; } #content h2 { margin-bottom: 20px; font-size: 18px; letter-spacing: -1px; color: #808080; } #footer { width: 700px; margin: 0 auto; padding-top: 20px; } #footer p { text-align: center; padding: 0; font-size: 10px; }<?php echo $website ?>
<?php echo $slogan ?>
<?php echo $footer ?>
This was a html template originally. To make it more versatile, I turned it into a .php file and added some php codes… but I cannot figure out how to make it display my page content where it says “(This is where content should go… but does not?)”.
I am VERY new at using php… but is there a code I can use to make my content appear in the right place? Can anyone help me with this?
Thank you in advance,
Wubbie