|
#1
|
|||
|
|||
|
So, i've been trying to learn php by watching this tutorial video: http://www.youtube.com/watch?v=mnf0zemQpEI
I follow the video instructions and created all files (index.php header.php footer.php sidebar.php and style.css) just like in the video tutorial. After creating the files and uploading them to my webhost server to test it, i've expected the page to look like this (like in the video): ![]() but instead, the page looks like this: ![]() Do i have do enable something first, or did I do something wrong. |
|
#2
|
||||
|
||||
|
Looks like you need to add a style sheet (css) to style the page ;-)
Steve |
|
#3
|
||||
|
||||
|
You also need to check the code. Several of the HTML tags are incorrect. For example, you have :
Code:
<head> </link rel="stylesheet" href="style.css" type="text/css" media="screen" /> </title>leev18.com</title> <body> Code:
<head> <link rel="stylesheet" href="style.css" type="text/css" media="screen" /> <title>leev18.com</title> </head> <body> |
|
#4
|
|||
|
|||
|
Doesn't work. Here's the source code I used, from the video tutorial.
■ index.php Code:
<?php include('header.php'); ?>
<div id="content">
<div id="contentleft">
<p>contentleft</p>
</div>
<?php include('sidebar.php'); ?>
</div>
<?php include('footer.php'); ?>
■ header.php Code:
<html> <head> </link rel="stylesheet" href="style.css" type="text/css" media="screen" /> </title>leev18.com</title> </head> <body> <div id="header"> <div id="logo"> <p>LOGO</p> </div> <div id="hsubscribe"> <p>Header Subscribe</p> </div> </div> </div id="navbar"> </p>navbar</p> </div> Code:
<div id="footer"> <p>footer</p> </div> </body> </html> Code:
<div id="sidebar"> <p>sidebar</p> </div> Code:
# body {
margin: 0px;
padding: 0px;
font-family: Calibri, Arial, Tahoma;
}
# header {
width: 900px;
margin: 0px auto 0px auto;
border: 1px solid #000;
clear: both;
}
# logo {
width: 400px;
float: left;
boarder: 1px solid #000;
}
# hsubscribe {
width: 400px;
float: right;
boarder: 1px solid #000;
}
# navbar {
width: 900px;
margin: 0px auto 0px auto;
border: 1px solid #000;
clear: both;
}
# content {
width: 900px;
margin: 0px auto 0px auto;
border: 1px solid #000;
clear: both;
}
# contentleft {
width: 550px;
float: left;
boarder: 1px solid #000;
}
# sidebar {
width: 300px;
float: right;
boarder: 1px solid #000;
}
# footer {
width: 900px;
margin: 0px auto 0px auto;
border: 1px solid #000;
clear: both;
}
Last edited by LeeV18; 10-17-2010 at 09:23 PM. |
|
#5
|
|||
|
|||
|
fix the errors that rick told you about and change to </div id="navbar"> to <div id="navbar">
__________________
|
|
#6
|
|||
|
|||
|
Besides the errors mentioned above, you need to fix your stylesheet - remove the space between the # and the style name so # header becomes #header.
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Your insight on reflection, redirection, learning IM/AM | Craig Mattice | Shared Hosting Support | 2 | 05-09-2009 07:57 AM |
| Learning PHP: beginners' resources | gwyneth | Shared Hosting Support | 12 | 03-05-2008 10:00 PM |
All times are GMT -5. The time now is 11:24 AM.












