...

View Full Version : why isnt my CSS working?



Kev0121
09-07-2010, 03:00 PM
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




<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



#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;

}

VIPStephan
09-07-2010, 03:13 PM
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.

Kev0121
09-07-2010, 03:24 PM
Yeh, the usercp.php is located in c:\wamp\www\blogit
and style.css is located in C:\wamp\www\blogit\includes

VIPStephan
09-07-2010, 04:04 PM
Then I suppose the path must read:

<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:

<link rel="stylesheet" type="text/css" href="includes/style.css" />



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum