Hi,
First off I'm new to webdev, so new I started about 3 hours ago. Im trying to rebuild my portfolio from just using wordpress to something new and nice.
So far I have managed to get my headers and menu working, upon realising the maintenece nightmare of copying this onto every page and then deciding I want to add a link, I googled for a solution to this problem, and came across using php Include(). The problem is, I cant get it to work, nor for the life of me, and using alot of google-fu can I work out why, maybe someone can help me out here.
Thanks, Scott
Index.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<LINK rel="StyleSheet" href="DefaultStylesheet.css" type="text/css" />
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>gameXcore Studios</title>
</head>
<body>
<?php include("Header.php"); ?>
</body>
</html>
Header.php
<LINK rel="StyleSheet" href="DefaultStylesheet.css" type="text/css" />
<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
<div id="wrapper">
<div id="header"> </div>
<div id="access">
<div id="menu">
<ul>
<li><a href="http://gamexcore.co.uk">Home</a></li>
<li><a href="http://gamexcore.co.uk/?page_id=5" title="Games">Games</a></li>
<li><a href="http://gamexcore.co.uk/?page_id=94" title="Projects">Projects</a></li>
<li id="rightAlign"><a href="http://gamexcore.co.uk/?page_id=8" title="Contact">Contact</a></li>
</ul>
</div>
</div> <!-- #access -->
</div>
</body>
</html>
Defaultstylesheet.css
@charset "UTF-8";
/* CSS Document */
body {
margin: 0px;
padding-top: 0px;
font-size: 14px;
background-color: #4c4c4c;
background-image: url('Images/Background.png');
background-repeat: no-repeat;
background-attachment: fixed;
font-family: Georgia, Times New Roman, Times, serif;
color: #FFFFFF;
height: 100%;
min-height: 100%;
}
#wrapper
{
padding-top: 8px;
background-image: url(Images/ContentStripeBackground.png);
background-repeat: repeat-y;
margin: auto;
width: 896px;
height: 100%;
}
#header
{
background: transparent url(Images/Header.png) no-repeat scroll 0 0;
height: 144px;
width: 832px;
position: relative;
margin: auto;
}
#menu
{
background-image: url('Images/NavBackground.png');
font-size: 13px;
height: 56px;
width: 844px;
margin: auto;
position: relative;
}
#menu ul
{
padding-top: 10px;
padding-left: 8px;
list-style-type: none;
}
#menu li
{
background: url('Images/NavButton.png');
background-repeat: no-repeat;
float: left;
width: 114px;
height: 34px;
text-align: center;
padding-right: 8px;
}
#menu li a
{
color: #000000;
font-weight: bold;
text-align: center;
text-decoration: none;
width: 114px;
height: 34px;
float: left;
padding-top: 8px;
}
#menu li a:hover, #menu li .on
{
background: url('Images/NavButtonHover.png');
background-repeat: no-repeat;
float: left;
width: 114px;
height: 34px;
text-decoration: none;
}
#menu li#rightAlign {
float: right; /* <- make last float to right */
}