HELP PLS - Trying to get CSS to load with PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zeusra
Forum Newbie
Posts: 6
Joined: Tue Sep 07, 2010 11:55 pm
Location: WA

HELP PLS - Trying to get CSS to load with PHP

Post by zeusra »

Hello, I am following along with the "Lynda.com.PHP.With.MySQL.Essential.Training.DVD" and am stuck on trying to get my css stylesheet to load with my pages. I followed line by line verbatim and still couldn't find the solution. Below is the CSS code I have entered in so far. Below that is the PHP code I am trying to load with the CSS.

Code: Select all

/* Site Colors:
    #1A446C - blue gret
    #689DC1 - light blue
    #D4E6F4 - very light blue
    #EEE4B9 - light tan
    #8D0D19 - burgundy
*/

html { height: 100%; width: 100%; }
body { width: 100%; height: 100%; margin: 0px; padding: 0px; border: 0px;
    font-family: Verdana, Arial, Helvetica, sans-serif; background #D4E6F4;
    font-size: 13px; line-height: 15px; }
img { border: none; }
table, tr, td { border-collapse: collapse; veritical-align: top; font-size: 13px; line-height: 15px;}
a { color: #8D0D19;}

#header { height: 70px; margin: 0px; padding: 0px; text-align: left;
    background: #1A446C; color: #D4E6F4; }
#header h1 { padding: 1em; margin: 0px;}
#main { margin: 0px; padding: 0px; height: 600px; width: 100%; background: #EEE4B9; }
#structure { height: 600px; width: 100%; }
#footer { height: 2em; margin: 0px; padding: 1em; text-align: center;
    background: #1A446C; color: #D4E6F4; }
    
/* Navigation */
#navigation { width: 150px; padding: 1em 2em; color: #D4E6F4; background: #8D0D19; }
#navigation a { color: #D4E6F4; text-decoration: none; }
ul.subjects { padding-left: 0; list-style: none; }
ul.pages { padding-left: 2em; list-style: square; }
.selected { font-weight: bold; }
    
/* Page Content */
#page { padding-left: 2em; vertical-align: top; background: #EEE4B9; }
#page h2 { color: #8D0D19; margin-top: 1em;}
#page h3 { color: #8D0D19; }

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Code: Select all

<html>
    <head>
        <title>Widget Corp </title>    
        <link href="stylesheets/public.css" media="all" rel="stylesheet" type="test/css" />
    </head>
    <body>
          <div id="header">
            <h1>Widget Corp</h1>
          </div>
          <div id="main">
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: HELP PLS - Trying to get CSS to load with PHP

Post by requinix »

1. That's HTML, not PHP. Big difference.
2. The HTML is incomplete. Did you not post everything?
3a. What URL are you using to see the page? Where is the file on your computer?
3b. Where is the style.css file on your computer?
zeusra
Forum Newbie
Posts: 6
Joined: Tue Sep 07, 2010 11:55 pm
Location: WA

Re: HELP PLS - Trying to get CSS to load with PHP

Post by zeusra »

OK thanks! I realized that the example given in the tutorial is incomplete. I am going to read from my PHP book now as opposed to going along with the video tutorials.
Post Reply