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 02-07-2012, 04:37 AM   PM User | #1
Autn5
New to the CF scene

 
Join Date: Feb 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Autn5 is an unknown quantity at this point
Small CSS problem

Here is my simple page
<html>
<head>

<link rel="stylesheet" type="text/css" href="/public_html/css/Style.css" />
</head>
<body>
<h1> Text </h1>
</body>
</html>

and here is my simple CSS page I'm trying to link to

body
{
background-color:#d0e4fe;
}
h1
{
colorrange;
text-align:center;
}
p
{
font-family:"Times New Roman";
font-size:20px;
}


Why isn't it working? is there a direct problem with any of my code?
I believe I have the link correct, my page is in the Public_html directory and in that directory is my css directory in which my CSS is is named Style.css


Could someone please help?
Autn5 is offline   Reply With Quote
Old 02-07-2012, 04:47 AM   PM User | #2
yennijb
New to the CF scene

 
Join Date: Feb 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
yennijb is an unknown quantity at this point
Try taking out the /public_html/ portion. That is the folder your entire website is in.

The link should just start with /css/ because that is the folder you will need to go into from where the file you are in is.

This is assuming your hierarchy looks like this:

index.html
/css/
Style.css
yennijb 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 10:11 AM.


Advertisement
Log in to turn off these ads.