Twenty Eleven – Page not exactly centered on the iPhone

  • Author
    Posts
  • #1094652

    tiagodovale
    Member

    Hi guys

    My blog resizes well for portable devices, like the iPhone, but it seems to be like 20 pixels off to the left: it’s not exactly centered.

    I reviewed my CSS but couldn’t find the guilty part.. any ideas??

    Cheers!!

    The blog I need help with is tiagodovale.com.

    #1094948

    To troubleshoot this, would recommend making a copy of your current custom CSS, then delete it and test again. If the margins look good, add back the first half of the custom CSS, save, and re-check. Repeat those steps until you find which CSS you’ve added is causing the trouble.

    #1094949

    tiagodovale
    Member

    Hi designsimply
    Thank you for coming to the rescue once again :)

    This line’s the culprit, meant to remove the search box..

    #branding .only-search #s {
    display: none;
    }

    With the search box on, everything is centered.. Any ideas on why and how one can remove it and still have a centered page?

    Cheers!!

    #1094950

    Nice find!

    Try changing the visibility property for it instead of the display property.

    #branding .only-search #s {
    	visibility: hidden;
    }

    Visibility:hidden keeps the structure of something and makes it invisible while display:none hides an element and also takes it out of the document flow (and so things can get rejiggered unexpectedly that way).

    #1094951

    tiagodovale
    Member

    Perfect :) Thank you so much, once again!!

The topic ‘Twenty Eleven – Page not exactly centered on the iPhone’ is closed to new replies.