Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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?

  • #2
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •