Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1207004

    Hi guys!
    I need to know how to disable landscape automatic rotation for mobile devices.
    My mobile site version needs to be only vertical.

    Regards
    Santiago

    #1207142

    Hi Santiago,

    Unfortunately disabling landscape rotation for mobile devices isn’t something that we can do.
    I think what we can do is set a maximum width for your site when the mobile device is in landscape mode, can you give us a link to your site? so maybe we can try to inspect and give you the right CSS codes to use.

    Best regards,
    Nikko

    #1207961

    Hi Nikko, thanks for your response!
    Mi site is https://www.santiagomoyano.com

    Regards

    #1208026

    Hi enfold,

    Please try adding this CSS code in Quick CSS, located in Enfold > General Styling:

    @media only screen and (max-width:767px) and (min-width:570px) {
      .responsive #top #wrap_all {
        margin-left: auto;
        margin-right: auto;
        max-width: 352px;
      }
    }

    Hope it helps.

    Best regards,
    Nikko

    #1214393

    Hi Nikko, thank you for the info, but it does not work

    Regards

    #1214399

    hm – i see this on my iphone emulation developer tools:

    isn’t that what you want?

    The only missing is a rule for the header – because it is in position:fixed – it is not influenced by wrap_all

    Try this instead:

    @media only screen and (max-width:767px) {
      .responsive #top #wrap_all {
        margin-left: auto;
        margin-right: auto;
        max-width: 352px;
      }
      .responsive #top #header {
        position: fixed !important;
        max-width: 352px;
      }
    }

    if you only like to have that for mobile devices you can use the class on responsive : avia_mobile to be more selective:

    @media only screen and (max-width:767px)  {
      .responsive.avia_mobile #top #wrap_all {
        margin-left: auto;
        margin-right: auto;
        max-width: 352px;
      }
      .responsive.avia_mobile #top #header {
        position: fixed !important;
        max-width: 352px !important;
      }
    }
    #1214400

    Hi,

    Did you add the code to the very top of quick css so it runs first? Also, clear the cache a few times over.

    Best regards,
    Jordan Shannon

    #1214745

    Yes, I see you like the image you show me, but I just need to disable landscape automatic rotation on mobile devices.
    I don’t know if is this possible

    Regards

    #1214757

    Hi,

    Unfortnately no, this is not possible. This is due to the rotation being a device function not theme.

    Best regards,
    Jordan Shannon

    #1214758

    Ok thanks

    #1214773

    Hi,

    If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Disable landscape mode on mobile’ is closed to new replies.