Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css is not working after uploading the file on server with filezilla or cpanel

I have uploaded the file.css file on server with filezilla and also with cpanel. But when i browse the website the css has no impact.

I changed: padding-left: 10px; If i see the Page view source i see that the older file is there.

What can be the reason for that ?

like image 744
shibly Avatar asked Sep 19 '11 15:09

shibly


People also ask

Why my CSS is not working on server?

You need to put the correct filepath in that piece of code I posted - where your stylesheet is actually situated on your webspace, either its complete URL including the domain or a correct relative path to the css file.

Where can I upload my CSS file?

You can upload your CSS file to free hosting sites like Github, Netlify, or Weebly, to name a few.


2 Answers

Try doing a hard refresh. CTRL Shift R. That should force any cached files to clear. Chances are that's the problem, unless the file isn't uploading. If you see the new file listed in Filezilla then it's a cache issue.

like image 54
Adam Avatar answered Oct 03 '22 03:10

Adam


Did you replace/overwrite the existing css file? It sounds like maybe the old one wasn't overwritten - in which case you'll have to do that for the changes to take effect.

Are you using a CMS? Some of them have Cache features where it may take time for those changes to be reflected unless you hard refresh.

like image 20
Hanny Avatar answered Oct 03 '22 03:10

Hanny