Ashan
Ashan

Reputation: 31

CSS Styles won't work in Local xampp server

why doesn't CSS styles show up correctly on xampp server

Note: I have linked the stylesheet correctly. And some styles seem to apply. But some style doesn't work on Xampp

Upvotes: 0

Views: 3950

Answers (6)

PatM
PatM

Reputation: 1

Not sure if this is your issue but my problem with CSS files not linking was because I had put them another folder layer or 2 deep and had to add .. before the file reference.

Was /cssfile
Had to change to ../cssfile

Upvotes: 0

Deadshot890
Deadshot890

Reputation: 1

The styles apply once you override the locally catched version: simply press ctrl + shift+ r

Upvotes: 0

Rishabh Aggarwal
Rishabh Aggarwal

Reputation: 83

I got the same problem and solved it by changing the name of the folder inside htdocs which contains the webpages. Hope it works ;)

Upvotes: 1

user7312892
user7312892

Reputation:

Try to use another browser and if you see the CSS there, then the problem is the Chrome's cache. To clear them, go to

chrome://settings/clearBrowserData

and clear the data

Upvotes: 1

StuiterSlurf
StuiterSlurf

Reputation: 2582

You can use stylesheet versioning

<head>
    <link rel="stylesheet" type="text/css" href="style.css?v=1.1">
</head>

If you use this even all modern browsers see that there is a new file. You can do the same for your javascript documents.

You can read more about this over here: https://css-tricks.com/can-we-prevent-css-caching/

Upvotes: 1

HasilT
HasilT

Reputation: 2609

Please empty your browser cache and reload. Sometimes modern browsers do cache stylesheets and scripts.

Upvotes: 0

Related Questions