SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Nov 2011
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Left side of site gets cut off in Android www.lukegruber.net

    My website is set up with a container 960px wide.

    View website:

    http://lukegruber.net

    but when I view this site on my android phone, the left is cut off and I cannot pan over to see it.

    Any help would be greatly appreciated as I cannot figure it out but I assume it is poor mark-up.

    Thanks!

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,208
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Don't know if this will help, but a much better way to center a page than this:

    Code:
    .container {
      left: 50%;
      margin-left: -480px;
      padding: 0;
      position: absolute;
      width: 960px;
    }
    is this:

    Code:
    .container {
      margin: 0 auto;
      padding: 0;
      width: 960px;
    }
    Give that a try and see if it helps.

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2010
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try width in em or %

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,379
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    As Ralph suggested you should never use that outdated method of centering that you are using because it will slide off the screen and be unreachable for all browsers at small window sizes.

    Use the margin:auto method that Ralph suggests.

    Try width in em or %
    That has no bearing here as it is the absolute centering method that is causing the issue


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •