Link css doesn't work?

Hello,

I have a question about linking css (in html document).
This is my code: .
For some reason it doesn’t work?
Can someone help me?
The path to the css document is right.

  • Jochem6

What is your code? No content is in your message.

Lol, I have posted the code.

The links in a HTML files should be web accessible links, not paths on the file system. Removing the /htdocs part should do the job.

Doesn’t work.

@jochem6 said:
Doesn’t work.

Link?

www.fortune.epizy.com

Index (Screenshot by Lightshot)

CSS (Screenshot by Lightshot)

Works fine from here, the blue background is very blue for me. What’s not working for you?

Try clearing your cookies, add ?Version=1.0 to the end of your css link code so it’s something like:
<link rel="stylesheet" type="text/css" href="theme.css?Version=1.0">
Change the “1.0” when you next upload to the web server or change the css file, for example after changing your css file change it t “1.1”

<link rel="stylesheet" type="text/css" href="theme.css?Version=1.0">

:open_mouth: I don’t get this anymore. Yesterday, it didn’t work and now it works. :slight_smile: Thank you all!

The blue background color is a test of css works (link).

The reason it didn’t work is because your Browser (all browsers) cache files like .css and .js because it helps make loading times quicker.
Try adding this to your <head> html tag:

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/> <meta http-equiv="Pragma" content="no-cache"/> <meta http-equiv="Expires" content="0"/>

This will prevent the files being cached (saved by the browser) I also recommend doing what I mentioned in my last comment as that works a treat!

It’s working for me.

But, I noticed that some of the coding is not fully finished.

`

  • login
  • register
  • About us
  • contact
`

I updated that for you. you was missing the </ul> at the end of the list.

I am facing error when i am uploading theme through FTP, it says stylesheet is missing. What i have to do.

@Gadgetsworld check the theme before uploading that it contains CSS stylesheet file

@Gadgetsworld said:
I am facing error when i am uploading theme through FTP, it says stylesheet is missing. What i have to do.

Please check whether you uploaded the correct folder. Sometimes, a theme may have multiple folders inside with examples and documentation, and you only need to upload one of those folders. Please check the documentation of the theme as well.