css stylesheet/images/menu using roll over images not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mia1990
    New Member
    • May 2014
    • 1

    css stylesheet/images/menu using roll over images not working

    Hi

    When I run my website on my computer, locally, everything works great. When i upload it to the server. Some of my images won't show, my css stylesheet doesn't work and my roll over menu is missing.

    I have checked things like lowercase and uppercase letters and have come to the conclusion that my paths are wrong somewhere.

    I have 8 html pages, a css stylesheet and images (which is also devided into sub folders)

    I am currently doing a course and for the course I have to structure the uploads in a spesific way. Thus the css stylsheet in a folder names css. When i upload all the files on one place everything works. But as soon as i move my css stylesheet into a new directory named 'css' i have the proble. (obviously i also modified the path)

    This is the code I use on my index.html to link my stylesheet.

    On the server it gives me the directory: the css file is placed inside the root then css folder then stylsheet/css is the files name.

    This is my path on my index html:
    <!doctype html> <html> <head> <link rel="stylesheet " type="text/css" href="/root/css/style.css"> <title>HOME PAGE</title>

    I have tried it with the / before root and without it. But nothing changes.
    Please help
  • nomad
    Recognized Expert Contributor
    • Mar 2007
    • 664

    #2
    A couple of things to look for.
    1. make sure your files and folders are spelled the same.
    2. these files are case sensitivity.
    3. make sure you have the files in the right directory.
    4. normal your html files is at the root directory.
    I don't think you need to add root to your directory.
    This is how I do it:
    <link rel="stylesheet " type="text/css" href="css/contact.css">
    you can do this to if you're running HTML5 and CSS3
    <link rel="stylesheet " type="text/css" href="css/contact.css" />
    hope this helps
    nomad

    Comment

    • ashjones86
      New Member
      • Jun 2014
      • 23

      #3
      Hi Mia,

      Nomad is right, it seems odd to see the root directory, it defiantly sounds like a path issue, try and put the css in the same directory as the index and upload, does it work then ? im happy to look at the files if you want to share them, and ill have a quick look into it for you.

      Generally speaking though, like nomad i would be going for something like this
      Code:
      <link rel="stylesheet" type="text/css" href="css/contact.css">

      Comment

      Working...