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 How to Make a Website Responsive Web Design and Testing Build a Three Column Layout

Christ khodabakhshi
Christ khodabakhshi
10,916 Points

Responsive design does not work on Iphone 5

why the following css style doesn't work for iphone 5, since Iphone 5 screen resolution is 1136x640 but it still shows two columns. But, it works perfect when I change my browser size in pc.

@media screen and (min-width:767px)  
{
  /******************************
  Two columns LAYOUT
  ******************************/
    #primary{
    float:left;
    width:50%
    }

   #secondary{
    float:right;
    width:40%;
    }

}

2 Answers

Armando Leon
Armando Leon
15,245 Points

I'm not sure if you used the viewport meta tag in your HTML. Try adding the following meta tag to your head element:

<meta name="viewport" content="width=device width">

I hope this helps :)

Christ khodabakhshi
Christ khodabakhshi
10,916 Points

yes, you are right, thank you for your help