CSS file dont work

Hello!

I am having problems with .css. On the index page, in the head section, there is a line:

In the same directory as the index file, there is a style.css file. When saving the css file the first time, everything works. But when you make changes to it and save, they don’t appear.

If I rename the css to another name (eg 123style.css) and do the same in the index file, the change works. But making other changes doesn’t work again.

The .css file must be renamed each time for the changes to work! How could this error be fixed?

Hi and welcome to the forum

Your browser caches CSS every time so it doesn’t have to load next time
and when you make changes, it simply serves that file from the cache
and it is necessary to force it to load the new state

Please clear the browser cache by pressing a few times Ctrl + F5 while viewing your website.
If that doesn’t help (because some browsers are stubborn) then follow these instructions

8 Likes

Thank you very much! Ctri+F5 solved the problem!

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.