开发者

Why is my CSS not working on my LAMP server?

So I just finished working on a site on my computer, and I put it on a flash drive and put it in my public_html folder on my se开发者_Python百科rver. When I type in http://localhost/ I get my index page but the css is gone and all the images are gone.

How can I fix this?


Sorry, this question is from years ago. For those interested, the problem was due to permissions on my server.


Ensure that you have put the right path for your css and images.


Make sure that inside your html, the path to your css is correct.
link rel="stylesheet" type="text/css" href="mystyle.css"

Your href="mystyle.css" should have a correct reference by using ..(dot-dot) just like "../folderName" in case your css file is one or more directory away from you main folder.


Sometimes all that you need to do is clear your browsers cache, which will store the pages current state and will sometimes ignore any new changes to the css and sometimes even images until the cache is cleared.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜