Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-07-2010, 02:00 PM   PM User | #1
Kev0121
New Coder

 
Join Date: Mar 2009
Posts: 97
Thanks: 10
Thanked 0 Times in 0 Posts
Kev0121 is an unknown quantity at this point
why isnt my CSS working?

Hi guys.

Ive included my css into my php file and still doesnt work :S NOTHING at all works, even if i change the family-font it wont change.

Heres my code

usercp.php file

Code:
<html>
    <head>
        <title> User Control Panel </title>
        <link rel="stylesheet" type="text/css" href="/includes/style.css" />
    </head>
    <body>
        <div id="wrapper">
            <div id="header" align="top">
                header
            </div>

            <div id="content" class="content" align="center">
                    CONTENT
            </div>

            <div id="sidebar" align="right">
                sidebar
            </div>
        </div>
    </body>
</html>

style.css

Code:
#content {
    border: 1px solid black;
    margin: 10px;
    font-family: Arial,Helvetica,sans-serif;
    font-weight: lighter;
    font-variant: small-caps;
}

.content {
    border: 1px solid black;
    margin: 10px;
    font-family: Arial,Helvetica,sans-serif;
    font-weight: lighter;
    font-variant: small-caps;
}

#header {
    border: 1px solid black;
    margin-top: 10px;

}
Kev0121 is offline   Reply With Quote
Old 09-07-2010, 02:13 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,615
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Where is the stylesheet located on the server? Currently it’s looking for it in the “includes” directory which is supposed to be directly in the root of your server.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 09-07-2010, 02:24 PM   PM User | #3
Kev0121
New Coder

 
Join Date: Mar 2009
Posts: 97
Thanks: 10
Thanked 0 Times in 0 Posts
Kev0121 is an unknown quantity at this point
Yeh, the usercp.php is located in c:\wamp\www\blogit
and style.css is located in C:\wamp\www\blogit\includes
Kev0121 is offline   Reply With Quote
Old 09-07-2010, 03:04 PM   PM User | #4
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,615
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Then I suppose the path must read:
Code:
<link rel="stylesheet" type="text/css" href="/blogit/includes/style.css" />
Or you use a relative path, i. e. without the slash at the beginning:
Code:
<link rel="stylesheet" type="text/css" href="includes/style.css" />
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:39 AM.


Advertisement
Log in to turn off these ads.