473,387 Members | 1,321 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
May 14 '14 #1
2 1556
nomad
664 Expert 512MB
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
Jun 13 '14 #2
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
Expand|Select|Wrap|Line Numbers
  1. <link rel="stylesheet" type="text/css" href="css/contact.css">
Jun 26 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: John Ortt | last post by:
Hi everyone, I posted with the title "Javascript Menu Not Loading Images" last week but I only posted the code as the site was on a corporate Intranet. Thanks to advice on the thread I have...
0
by: Vannela | last post by:
I have got the user control for the menu using the ie web controls. If i wan to execute the events on the client side how should i write the code and also if i want to write the code at the server...
0
by: nail | last post by:
Hi. I have this xml file: <menu> <header caption="File"> <item header="File" caption="New File"></item> <item header="File" caption="Open File"></item> <item header="File" caption="Close...
2
by: Anthony | last post by:
Hi all, i have managed to create an asp.net menu using xml and xslt.. i am now trying to highlite the selected path by sending in the path info and hilite it using an xsl select choose function....
2
by: poojo hackma | last post by:
In my Project, I have added a couple hundred images using "drag-n-drop" to the Properties.Resources section. All of these images were in the "images" folder of my Project on my computer, and the...
1
by: nasirmajor | last post by:
Dear All, being a new to asp.net i want any guidence, ariticle or sample releating dynamic menu using sqlserver database. where to start. Any help Thanks In advance
1
by: Elitephoto | last post by:
How to make horizontal menu using .js and .css files. I only need 5 links. I am new to this and have tried everything I can but was not able to do this. Can someone please write two separate...
0
by: hinchb | last post by:
I have coded a Non-CSS menu using IFRAMES which I would like your opinion on. It seems to work in all the browsers I've tested. Do you see any disadvantages in using something like this. Here is...
2
colinod
by: colinod | last post by:
I am trying to build a JQuery menu using a list element. I can get the elements to appear when my mouse hovers over the top button but they dissapear before i can get to the sub menu buttons ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.