Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99131

CSS file won't load in React JS

$
0
0

enter image description here

This is how my folder looks like.

<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible">
        <link rel="stylesheet" href="../src/App.css">
        <title>Document</title>
    </head>

    <body>
        <div id="practice"></div>
        <div id="farm"></div>

    </body>
</html>

And this is the code, but still React won't track the path from the HTML. CSS file won't be loaded even the path is correct.

enter image description here

I can open the file by clicking CTRL + LMB in VSC like a GIF above. For testing, I changed the path as ./src/App.css then VSC couldn't open it because the path is wrong.

Why it keeps happening and are there any ways to fix this problem?

Thanks to listen.


Viewing all articles
Browse latest Browse all 99131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>