Forums

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

Home Forums CSS prevent landscape rotation?

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #196332
    claire2013
    Participant

    I have a div that needs to be in portrait mode. It won’t do any good in landscape mode so the user will not miss out on anything.

    Is there a way to prevent the div from rotating when the user urns their phone to landscape?

    I seen this done with the Tumblr app, but I’m not sure how to achieve this using plain html and css.

    #196347
    claire2013
    Participant

    I am speaking of a website. I would like the element to remain exactly the same with the same dimensions. Being stretched would break it and would involve a new design.

    If the user rotated their phone to landscape, I would want the element to remain in portrait mode.

    #196348
    claire2013
    Participant

    Actually, it’s not a website? It’s more of a project. No links, just visuals.

    #196352
    claire2013
    Participant

    It is fixed and it’s also a vertical rectangle. So the top and bottom are cut off in portrait mode.

    Yes, it will be see in a browser.

    #196354
    claire2013
    Participant

    Here’s a quick fiddle for a visual http://jsfiddle.net/L166jkx9/

    The bottom div is my current situation. The top div is what what happens when phone is in landscape mode. I would like the div to remain like the bottom div when in landscape mode.

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