JS and CSS files not applying

Status
Not open for further replies.

jmcgowan

Member
Messages
134
Reaction score
1
Points
18
I set up a simple webpage on my site with a .css file and a .js file to go with it. After putting some sample/test code in all three files, I opened up the page and I can see the content from the html file, but not the styles or scripts from the other two files. When I looked at the page source the links are written correctly, and I can follow those links to the files, which do display correctly, but it's not being applied to the html files. Any thoughts on what might be causing this?
 

addozone

Member
Messages
64
Reaction score
3
Points
8
If all the files have been uploaded to the server directory (yes?) and the html links to those files are correct, there should be no issue for .css and .js linking. Based on my own experiences on past sites, my money is on those links. If your html is running but there is no CSS formatting or .js features, it sounds like a link issue. If you post a screenshot of the directory and link syntax, we can all look at it.
 

Anna

I am just me
Staff member
Messages
11,739
Reaction score
579
Points
113
First thing that comes to mind to look at is if the case match on the actual filename and the link for them in your html code. Linux (the OS we run here) is case sensitive, meaning file.html and File.html would be treated as different files altogether, while on windows that isn't case sensitive they would be seen as the same file.
 

lylex10h

Active Member
Messages
982
Reaction score
71
Points
28
What is the URL of the webpage this is happening on?
 
Status
Not open for further replies.
Top