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
Ian Adams
Full Stack JavaScript Techdegree Student 4,128 PointsIphone Media Query: Portrait
In a lesson for my profile page, I used media query to have the site respond to Iphone screens. By using an nth-child clear, the pictures line up according to plan, BUT only in landscape view. Is there a separate media query for the portrait display or is because I'm using an old Iphone 4?
1 Answer
Jonathan Grieve
Treehouse Moderator 91,254 PointsYou can use a media query like this to target devics of a certain width to mimic a landscape screen. Remember it's best to target with widths rather than particular devices because there are so many out there these days!
@media screen and (min-width: 321px){
//styles
}
Ian Adams
Full Stack JavaScript Techdegree Student 4,128 PointsIan Adams
Full Stack JavaScript Techdegree Student 4,128 PointsAhhh, 321px. I looked up the media query and thought that I saw min-width: 320px;
I'll give this a shot. Thanks.