Reputation: 1277
I recently built a site and centered it using margin: 0 auto
. I also wrapped elements in a .wrapper
class with a width set to 960px and then had the parent element extend across the whole browser.
When I view the Brands screen on an iPad though, the site is left-aligned and does not extend across the whole window. Any thoughts to why this might be happening, and how to correct it?
See below for a screenshot:
Upvotes: 2
Views: 5788
Reputation: 21
This works for a centered webpage with a width of 1024px:
<meta name="viewport"
content="width=device-width, initial-scale=0.95, maximum-scale=0.95">
Upvotes: 2
Reputation: 98796
Looks like you’ve got a few validation errors on that page:
I suspect they might be causing the issue. If you look at the page in e.g. Chrome, you’ll see a horizontal scrollbar and space outside your wrapper <div>
there, so the issues aren’t limited to the iPad.
Upvotes: 2