Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css file won't load when opening my website

Tags:

html

css

i tested it locally and it's worked but when i upload it to my web host, some of the css code is not fully loaded, only some of the code inside of it are loaded. what happen pls i need help. i already checked the path.

thank you :)

this is from the host enter image description here

this is from the local file

this is from the local file. all the thing is already done, just need to upload


<html lang="id">
    <head>
        <title>Weebs Desu! official discord website</title>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1"/>
        <link rel="stylesheet" href="style.css" />
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />```


like image 893
donowhattosay Avatar asked Sep 14 '25 03:09

donowhattosay


2 Answers

You need to provide more data to give us some clue, but here is a thing.

Maybe because the version of your css is not updated in the hosting yet. You already change your css code but the result still same as before. The solution for this is you can add some v?=1.10 behind style.css.

So the result will be style.css?v=1.10, so the browser wont load the older version of css.

The number ?v=1.01 can be anynumber as long as greater than before (It works like patch).

like image 91
nabil arta Avatar answered Sep 16 '25 19:09

nabil arta


Mine was not loading any of my CSS file and JS file, I used Chrome developer tool to troubleshoot and understand where the problem was. Check the image below enter image description here

I later realized that there were missing files in folders 'css' and 'js' with file names 'styles.css' and 'scripts.js' respectively.

Always countercheck the local files with the uploaded files. There might be a missing file.

like image 30
felix mutai Avatar answered Sep 16 '25 17:09

felix mutai