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 trialJack Fitzgibbon
7,607 PointsCSS Gallery, Need help!
Hello, Im trying to make the 2 column gallery to change to a 1 column gallery when in mobile view. I have made attempts at this but cannot succeed. If anyone know how to do this, please comment down below. Thanks
CodePen: http://cdpn.io/dmeia
3 Answers
Nick Nish
7,304 PointsHey Jack, did you figure it out? I'm looking at the Codepen and it seems like you achieved the 2 column-layout that degrades to a single-column for smaller screen sizes.
By the way if you ever want to view this on mobile for real don't forget the mobile meta-tag.
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
Jack Fitzgibbon
7,607 PointsFixed the problem now, thank you everyone for your help!
Jason Founts
Courses Plus Student 14,384 PointsNot sure how to guide you. I don't see a media query to tell the objects to switch their display to full viewport width instead of two columns (45%). Maybe you start there?
Jack Fitzgibbon
7,607 Pointsdone that but still and issue. Updated the CodePen, take a look for yourself.
Jack Fitzgibbon
7,607 PointsJack Fitzgibbon
7,607 PointsI have solved it but if you look in the smaller viewport you can see you have to scroll horizontally, I don't want that. And thanks for reminding me to use the meta tag:)