Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #753351

    Hi,

    I developed a new website using the Enfold Theme. The images are looking good on a desktop and laptop but on a smartphone and tablet the images don’t resize enough to be displayed in an acceptable manner.
    Please find in the private content the website and login details.
    I appreciate your advice on how to change settings to achieve a better layout on these platforms.

    Kind Regards,
    Maarten

    #756160

    Hi Maarten!

    Thank you for using Enfold.

    The image in the slider is set as background and its background-size property is set to “cover” which means that it will force the image to cover the whole container. In doing so, it has to cut off parts of the images in order keep the image’s aspect ratio. We can set it to 100% but it will distort the image so another solution is to adjust the background position, making most of the images visible inside the slider container.

    .avia-fullscreen-slider .avia-slideshow>ul>li {
        background-size: cover;
        background-position: 60% 50% !important;
        background-repeat: no-repeat;
    }

    Cheers!
    Ismael

    #756279

    Hi Ismael,

    Thank you for your explanation and advise.
    I applied your solution and the only issue is the display on an iPad. On the smartphone it looks OK. But even with adding your css it doesn’t improve the image size. I removed the additional css for the moment. Is there an extra setting necessary to ‘tell’ the website that it is displayed on an iPad?

    Cheers,
    Maarten

    #756725

    Hi!

    The code should affect both tablet and phone view. Please remove browser cache or hard refresh before checking the page.

        @media only screen and (min-width: 768px) and (max-width: 989px) {
           .avia-fullscreen-slider .avia-slideshow>ul>li {
               background-position: 70% 50% !important;
           }
        }
    
        @media only screen and (max-width: 989px) {
            .avia-fullscreen-slider .avia-slideshow>ul>li {
                background-position: 60% 50% !important;
            }
        }

    // http://i.imgur.com/3TjUMGM.png
    // http://i.imgur.com/dnWIndS.png

    Another solution is to add another slider (full width easy slider) that is specifically created for mobile view. Toggle the sliders’ display property with css media queries.

    // http://kriesi.at/documentation/enfold/hide-menu-itemselements-on-mobile/

    Cheers!
    Ismael

    #756769

    Hi Ismael,

    Thanks!
    In landscape it looks OK but in portrait not. I added the code in the Quick CSS area. Is that OK?
    I added a link to a screenshot of my iPhone 6 in the private content area.
    The same happens when I resize the window in e.g. Firefox. I don’t get the same result as you in http://i.imgur.com/dnWIndS.png
    Please advise me what I should do.
    Cheers,
    Maarten

    #756787

    Hi!

    Please insert this additional css media queries.

    @media only screen 
        and (max-device-width: 640px), 
        only screen and (max-device-width: 667px), 
        only screen and (max-width: 480px)
    { 
          .avia-fullscreen-slider .avia-slideshow>ul>li {
               background-position: 70% 50% !important;
           }
    }

    Adjust the background-position values as needed.

    // https://www.w3schools.com/cssref/pr_background-position.asp

    Regards,
    Ismael

    #756844

    Hi Ismael,

    Thank you. That worked well.
    Any advise/suggestions for scaling of the two other images on the homepage?

    Regards,
    Maarten

    #757634

    Hey!

    Are you referring to the cell backgrounds? The images are a bit too big for the cells. The actual size of the cells are 790x705px on desktop view so having the same size for the image should improve the background display mobile view. Or you can use this css code.

    @media only screen and (min-width: 768px) and (max-width: 989px) {
        .flex_cell.av-hide-on-mobile {
            background-position: 70% 50% !important;
        }
    }

    You can insert the css declaration inside one of the existing css media query.

    Cheers!
    Ismael

    #759500

    Hi Ismael,

    I first reduced the image size, but then the image looks blurry on the big screen.
    I have the full size image back and added the css code to the quick css . I don’t see any difference or improvement.
    The cell background images are still not resized properly.

    I checked your demo theme http://kriesi.at/themes/enfold-health-coach/ and reducing the window size introduces the same issue. The cell background images are not resized.

    Any suggestions?

    Thanks and regards,
    Maarten

    #759821

    Hey!

    I checked your demo theme http://kriesi.at/themes/enfold-health-coach/ and reducing the window size introduces the same issue. The cell background images are not resized.

    As I explained in my first post, we can set the background-size property from “cover” to “100%” or “contain” but it will distort the image. Which one do you prefer?

    @media only screen and (min-width: 768px) and (max-width: 989px) {
        .flex_cell {
            background-size: 100% 100% !important;
        }
    }

    And the cells’ background option, as much as possible, is not meant to be use for images with a specific focal point (image of a person an object etc). It works better for images with a wide range of focal flexibility such as image textures, wallpapers, sceneries etc. By adjusting the background position we can make the images’ focal point visible in the container.

    @media only screen and (max-width: 989px) {
        .flex_cell {
            background-position: 70% 50% !important;
        }
    }

    Best regards,
    Ismael

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.