0

I am having trouble with CSS showing up on my server environment. I've tried setting the href to /css/style.css and including the type="text/css" header, however nothing is working. The CSS shows up in the local environment just fine, and when I go to my website and visit the developer network tab, it shows an old version of the CSS. I am saving the document.

Header code:

<link rel="stylesheet" type="text/css" href="/css/style.css"/>

CSS code:

body {
    margin: 2vh;
    margin-left: 6vh;
    margin-right: 6vh;
    font-family: Arial, sans-serif;
}

Any solutions are appreciated.

  • what is the website link? – Nabeel Khan Oct 31 '21 at 20:09
  • Please have a look at this -> https://stackoverflow.com/questions/19142887/cant-find-css-files-on-server-when-they-are-there – Hexiler Oct 31 '21 at 20:09
  • The website link is https://teknet.app/ – Nycrite Oct 31 '21 at 20:11
  • Does this answer your question? [Relative path in HTML](https://stackoverflow.com/questions/24028561/relative-path-in-html) – A. Meshu Oct 31 '21 at 22:21
  • No. When I visit my local site, even with the relative path in my code, it works, however on Cloudflare and my IPv4 address, it does not work. Only solution is with `/style.css?v1` however I'm looking for a more automatic solution. – Nycrite Nov 01 '21 at 00:11

0 Answers0