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

CSS

responsive css

my responsive css working in Safari but not in Google Chrome. What is problem?

@media screen and (min-width:320px){ #gallery li { width: 100%; padding: 20px; } @media screen and(min-width:768px) { #gallery li { width: 50%; } @media screen and(min-width:1024px) { #gallery li { width: 33.3333%; }

1 Answer

dragos busuioc
dragos busuioc
24,908 Points

i doubt that it work in safari.but i dont know,i could wrong. first in the first media query put a space before opening curly brace. second you didnt close the media query rule.

@media (min-width:320px) {

    element  {
      property: value;


    }

}