• When starting out in portrait mode, photos are the appropriate width for the post.

    When moving the iOS device to landscape mode, the photos are a bit smaller and so is the width of the page.

    Turning the iOS device back to portrait mode, the posts look the appropriate width again.

    While back in landscape mode, refreshing the page brings all the widths to the expected sizes.

    This is in all current iOS on iPad mini 3 and iPhone 5S and a friend’s iPhone 6 Plus.

    How would one make the page refresh when switched to landscape mode?

    You can try this out on https://shortblondeguy.com – If I resolve it I’ll update this post.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Hi there – could you clarify what you’re expecting to see? I switched your homepage from portrait to landscape and back a few times on iPhone 5s but I didn’t see anything out of the ordinary so perhaps I’m not clear on what you’re seeing vs. what you’re expecting to see.

    Would it be possible to upload a screenshot of what looks wrong on your end, to help me better understand the issue?

    Here’s a guide on how to make a screenshot:
    https://en.support.wordpress.com/make-a-screenshot/

    You can upload the screenshot – in a graphic format like JPG, PNG, or PDF – in your Media Library, and provide a link so I can see it, or upload it with a service like Imgur or Snaggy.

    Let me know on what device you took the screenshot, as well as the iOS and browser. Thanks!

    Moderator Kathryn Presner

    (@zoonini)

    Ah, I just found your other reply with a video, thanks. ??

    Copying here for reference so everything’s in one thread:

    —-

    Hey Kathryn!

    I’ll get video showing my screen on my iPad and iPhone.

    https://www.flickr.com/gp/poofterorg/9X3V3n
    (My pointing on the video is about the width of the border. I was not trying to pinch out or in to zoom.)

    So I can type less Landscape and Portrait oriented photos are “wide” and “tall” respectively.

    On iOS devices (iPad mini 3, iPhone 5S & a friend’s iPhone 6 Plus – all current SW) it acts like this:

    • Portrait Mode – as wide on the screen as I specified (except tall photos on iPad).
    • Landscape Mode – not as wide as the screen. The posts get as wide as the screen but photos do not.
    • Landscape mode after refreshing – Wide photos display full width of post. Tall photos still are not as wide as the post.

    On my iPhone 5S, all photos are really small at not even half the width of the screen, after switching to Landscape mode.
    On the 5S, refreshing the page, all photos are full width.

    1. How could I force the tall photos to be full width?
    2. If I cannot, how do I make a refresh happen when orientation is switched?
    3. Also if I cannot, how could I make tall photos centered in the post without the other post elements being centered?

    Also yes I can create a new post next time. Would you like me to now?

    Thanks!
    Anthony

    Thread Starter shortblondeguy

    (@shortblondeguy)

    Thanks for copying this over! I realized my concern in the other thread was more about this. ??

    Moderator Kathryn Presner

    (@zoonini)

    Hi Anthony, I think option #3 is the simplest. You can try adding something like this to your custom CSS or child theme to centre your images within posts on smaller screens only:

    @media screen and (max-width: 1280px ) {
      .entry-content img.size-large {
        margin: 0 auto;
        display: block;
      }
    }

    Don’t edit the theme files directly, otherwise your changes will be overwritten whenever the theme is updated.

    Since you’re already using Jetpack, an easy way to add custom CSS is to activate the Custom CSS module. You’ll then add your custom CSS in the new stylesheet editor that’ll appear in your dashboard, under Appearance > Edit CSS.

    Thread Starter shortblondeguy

    (@shortblondeguy)

    Howdy,

    Will the Custom CSS work when I am not using WordPress.com for hosting?

    Also is there any refresh on orientation change option I might be able to use?

    (Issue is resolved when a page is refreshed.)

    Sorry for my long time not replying.

    Thanks,
    Anthony

    Moderator Kathryn Presner

    (@zoonini)

    Will the Custom CSS work when I am not using WordPress.com for hosting?

    Hmm, I’m not sure what you mean about WordPress.com, aren’t you self-hosted, running the WordPress software on own hosting? If you use the Custom CSS module in Jetpack, the Custom CSS will remain there until you either remove it or deactivate the module.

    I found some jQuery scripts to reload the page on orientation change:

    https://stackoverflow.com/questions/17708869/how-to-reload-the-webpage-when-orientation-changes

    You might be able to put that in a child theme, so your changes won’t be overwritten when you update the theme. If you’re new to child themes, you can explore these guides:

    https://codex.www.ads-software.com/Child_Themes
    https://op111.net/53/
    https://vimeo.com/39023468

    A CSS workaround is a much easier route.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘iOS orientation resizing is odd’ is closed to new replies.