Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: css locating problem

  1. #1
    Join Date
    Nov 2007
    Posts
    346
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default css locating problem

    Hello, when I locate one of my css files from my public_html with the link
    HTML Code:
    link rel="stylesheet" media="all" type="text/css" href="file.css" /
    , it works perfectly, however, when I move those files into a nother file within public_html called "css" and put this as the code
    HTML Code:
    link rel="stylesheet" media="all" type="text/css" href="http://www.website.com/css/file.css" /
    , it does not work. Can anyone tell me why please and thank you!

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    link rels are relative, and it SHOULD work with the absolute as you have it, so 1) be sure the folder is readable (CHMOD 644 or 755) and 2) that the file is actually in the folder.

    otherwise just use a relative one:

    Code:
    <link rel="stylesheet" type="text/css" href="css/file.css">
    sometimes you will also need a forward slash before the directory:

    Code:
    <link rel="stylesheet" type="text/css" href="/css/file.css">
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Nov 2007
    Posts
    346
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The folders readable; it's CHMOD is 755 and I used the one with the forward slash infront and it still does not work.

  4. #4
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Are you sure that the path is correct? When you input http://www.website.com/css/file.css into your browser, does it direct you to download the correct file?

  5. #5
    Join Date
    Nov 2007
    Posts
    346
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I used it as example and the link that I have it as in my code works perfectly. Thanks!

  6. #6
    Join Date
    Nov 2007
    Posts
    346
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Anyone please and thank you!

  7. #7
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by afe View Post
    The folders readable; it's CHMOD is 755 and I used the one with the forward slash infront and it still does not work.
    did you use the one without the forward slash?

    I fail to see how it isn't working wither way though, unless you aren't closing something.

    Could you link to the page or post your whole <head> section here?
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  8. #8
    Join Date
    Nov 2007
    Posts
    346
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    http://www.athletes4excellence.com/layout.php That's the page, however, I have the file in public_html and have it linked to there. If I were to add "css/menu.css" instead of "pro_dropline.css" there would be menu.css in css which is the same file as "pro_dropline.css" only with a different name.
    Last edited by afe; 01-02-2008 at 03:03 AM.

  9. #9
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Replace

    Code:
    <link rel="stylesheet" media="all" type="text/css" href="pro_dropline.css" />
    With:
    Code:
    <link rel="stylesheet" type="text/css" href="css/menu.css">
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  10. #10
    Join Date
    Nov 2007
    Posts
    346
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Still does not work.

Bookmarks

Posting Permissions

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