iPhone Safari adding padding?

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
Cirdan
Forum Contributor
Posts: 144
Joined: Sat Nov 01, 2008 3:20 pm

iPhone Safari adding padding?

Post by Cirdan »

So here is how the page looks normally:

Image

Now, if I rotate the iPhone horizontally, it expands and flows beautifully. If I turn it back vertically, everything sorta shifts left.

Image

What could be causing this? I have -webkit-text-size-adjust:none; placed in the effected blocks.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: iPhone Safari adding padding?

Post by JAB Creations »

WebKit is an awesome rendering engine (the browsers it's embedded in suck though) so my best guess is that your CSS is static. You should change your width to percentage instead of pixels.

Also remember that your parent most div elements should only have width set and then first-child level div elements should use margin to "emulate" padding.
Post Reply