Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Flask Basics Templates and Static Files Static Files

Diem Pham
Diem Pham
12,276 Points

why styles.css doesn't work on Chrome?

The background and font color do not change on Chrome but they do on Safari. Could anyone please explain why?

4 Answers

jason chan
jason chan
31,005 Points

clear browser history or refresh a few times. Or try icognito.

You might have to do css prefixes. I hope that helps.

Yosef Fastow
Yosef Fastow
18,526 Points

I had the same problem but if you refresh it a few times it fixes itself. It is weird that that is happening. I'm using firefox.

Wu Ray
Wu Ray
2,359 Points

actually I also have the same problem, it seems the browser's cache stop to read the new scripts. try eliminate the history data would help instantly. :)

Daniel Kaczmarczyk
PLUS
Daniel Kaczmarczyk
Courses Plus Student 5,536 Points

I had the same issue, what helped me is adding the type="text/css" tag.

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

Ming Jun Lim
Ming Jun Lim
10,060 Points

Thank you, this worked!

Make sure the it is type="text/css" and not type="css/text"

In Chrome if you go to the DevTools settings, you can disable the cache as long as DevTools is open.