Search code examples
javahtmlcssmodel-view-controller

the link to css file does not work, a have check everything, still does not work, anybody answer me, what is wrong?


html file cannot see css file

in my previous project the same link to css file worked[enter image description here](https://i.stac##

1.


Heading

##k.imgur.com/u6L9P.png)


Solution

  • The webserver will look for your CSS file starting from the location of your index file. Important: See Quentin's note under your question for important information when you are using templates and frameworks. This sentence only applies to traditional HTML construction - but it also applies once your project has been generated and uploaded to the web server.

    According to that code, the file style.css should be in the same folder as the index file, and spelled exactly as specified. Capitalization matters: Style.css is not style.css.

    Did you move the style.css file into a subfolder? Is the capitalization different?