treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Mobile design doesn't work?

  • So I created a mobile site. Everything that has to do with width pertaining to a mobile site is a percentage. But when I view it on my iPhone, it just shows the site the same as it is on the desktop, just zoomed out. How can I fix this.

    My Site
  • @Odd_E,

    I believe that even though you are using 100%, your site still needs media queries to target those different devices.

    This is my example, i had just got into media queries the other day. Basically i designed a simple layout that would change depending on device. There are some discrepencies but you will get the idea.

    The media query will target the width of a browser, just check out my comments when you view source

    http://dl.dropbox.com/u/47096192/css-tricks/index.html
  • Try adding this to the header of the mobile theme.


    <meta name="viewport" content="width=device-width" />
  • @TheDark12
    That worked perfectly, thank you!