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!
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

Adam Smallman
4,182 Pointsmedia query for chrome
I add a media query and it works in safari but not in chrome any ideas?
@media screen and (max-width: 800px) {
.work ul li{
width: 100%;
}
}
3 Answers

Carman A
7,672 PointsAre you using sublime-text 3? Because for me media queries don't work with it.

Tom Bedford
15,645 PointsAdam - take a look at this codepen try it in Chrome and Safari it should make the li elements 100% wide and have a red background at < 800px.
Perhaps if you share additional code or make a codepen for your project someone could pinpoint the problem.

Adam Smallman
4,182 PointsThank you for helping me. I figured it out all i need to do was put
flex:none;
and it worked hahaha i don't know why

James Barnett
39,199 Points>
it worked hahaha i don't know why
Well if you don't know why, you've got a problem. We call this cargo cult programming and it's a bad item â„¢
Tom Bedford
15,645 PointsTom Bedford
15,645 PointsHi Carman, your text editor shouldn't have anything to do with code working or not.
Carman A
7,672 PointsCarman A
7,672 PointsThat's what i thought too but if i copy and paste the code into another editor it works if i downgrade to sublime-text 2 it also works.