I was hoping to just use,
<meta name="viewport" content="width=device-width,maximum-scale=1.0,user-scalable=false" />
and then call different style sheets based on the width. The only problem is that the iPhone4 reports a width of 320px even tho its 640px. How would I conditionally set the content width to 640px for iPhone4s?
I would look into
Media Queriesto achieve what you are asking.Here are some really good articles related to building responsive, fluid, multi-device websites:
Smashing Magazine’s ‘How to use Media Queries’:
http://www.smashingmagazine.com/2010/07/19/how-to-use-css3-media-queries-to-create-a-mobile-version-of-your-website/
A-List Apart article on Fluid Grids:
http://www.alistapart.com/articles/fluidgrids/
And, Smashing Magazine article on Responsive web Design (references A-List Apart’s article on same subject):
http://www.smashingmagazine.com/2011/01/12/guidelines-for-responsive-web-design/