dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Can't link to my CSS

  1. #1
    Join Date
    Mar 2013
    Location
    Yorkshire
    Posts
    6

    Can't link to my CSS

    I have my test website uploaded via FTP (using FileZilla) and everything works great.

    The only problem I'm having, is that I cannot refer back to my style.css from my pages folder.

    My folder structure:
    server >
    website
    >
    css
    >
    style.css
    pages
    >
    about.html
    contact.html etc...
    index.php

    The CSS file works on my index.php but when I go to one of my pages using the navigation bar, it doesn't load and tries to link by using this: http://mydomain.com/website/pages/ab.../css/style.css and not http://mydomain.com/website/css/style.css

    How do I fix this, if it's possible?
    Thanks!

  2. #2
    Join Date
    Mar 2011
    Location
    The Pleiades
    Posts
    31
    Is the /page/ folder WITHIN your CSS folder or is it at the same level as your CSS folder?

    Kind regards,

    LC.

  3. #3
    Join Date
    Feb 2013
    Location
    New York
    Posts
    6
    You should link to it the same way you are linking to it on your index.php page.

    <link rel="stylesheet" href="../css/styles.css" />

    or

    <link rel="stylesheet" href="http://mydomain.com/website/css/style.css" />

  4. #4
    Join Date
    Mar 2013
    Location
    Yorkshire
    Posts
    6
    Thanks a lot, I got it working!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles