Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Flask Basics Templates and Static Files Static Files

Julie Pham
Julie Pham
12,290 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,009 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.