The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS iPhone container width issue

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #36974

    I have seen this before on other sites, and am curious as to how to fix this on a site I am developing. You can see from this image ( what is happening here. I believe that I know the issue, but I do not know how to fix it.

    The issue:

    This site has a container div of 978px wrapped around the content. Within that container there is an absolutely positioned div (the burst graphic behind the video player) that is pushed outside of the container to the right. Mobile Safari is taking the container width and adding the amount of pixels the absolutely positioned div is sticking out of the container and using that as the total width of the site.

    Any idea on how I can fix this? This is a link to the site –


    Yup, Mobile Safari considers that part of the content that is actually pushed outside the container as proper content, and therefore shows it as if the site is more than that designated 978 pixels.

    You’ll have to use a method where those bottles (that you see behind the video player) are not considered content, but just styling. I believe the best way to do that is to keep everything within that 978 pixel space (not have anything “escape” that container), and make those bottles a background image of the BODY tag.

    Try this by setting the container to overflow:hidden and see if that at least centers the site better. If it does, then you can put those bottles (and that sunshiny splash) as the background image (of this particular page at least).

    Another option would be to also have some (empty) content escape the LEFT side of the container, so that the balance is more symmetrical.


    The background option is the most usefull for now, i think. On the other had, it might be a tuff one to get it in the right position, because you use several width’s on different pages.

    Don’t make it yourself to hard. Use one “main” width.

    Btw: why don’t you use any floating for header, home-text etc? On that way you won’t have to use the empty (google hates it!) clear div. And it makes positioning the div way easier.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.