New Landing How can we help? Themeforest Theme Support Flexform Alt background not responsive for one image only

Viewing 15 posts - 1 through 15 (of 15 total)
  • Posted in: Flexform
  • #206392
    hillcapital
    Member
    Post count: 74

    I created a test page that I’d like to use with a full width text box with alt background. The image for this alt background isn’t responsive at all. I tested other images on this test page and they are responsive. I’m not sure what the problem is.

    Website info will be posted below.

    #206393
    hillcapital
    Member
    Post count: 74
    This reply has been marked as private.
    #206399
    hillcapital
    Member
    Post count: 74

    I’ve solved the responsiveness, but when in smaller windows, there is a white space beneath the first alt background section.

    #206403
    hillcapital
    Member
    Post count: 74

    Resolved by myself.

    Solution if anyone is interested:
    I solved the issue with a bunch of media queries for various sizes, selecting the class of the specific section and changing the height.

    For example:
    @media only screen
    and (min-width: 495px)
    and (max-width: 767px){
    .home-row-simple {
    min-height: 250px;
    }
    }

    #206404
    hillcapital
    Member
    Post count: 74

    Actually, the issue is not resolved. On my phone, the white space is still there beneath the section.

    #206885
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    That looks to be because of the custom CSS:

    Can you amend it with this:

    @media only screen and (max-width: 979px)
    @media only screen and (max-width: 768px)
    @media only screen and (max-width: 474px) and (min-width: 301px)
    .home-row-simple {
        min-height: 140px;
    }

    Thanks,
    David.

    #206927
    hillcapital
    Member
    Post count: 74

    Hi David,

    I just added that custom css and deleted the ones I wrote with media queries. The white space is still there. Can you check?

    Thanks

    #206936
    hillcapital
    Member
    Post count: 74

    Update:

    I used that code and also kept:

    @media only screen and (max-width: 1024px) {
    .alt-bg.alt-five {
    background-image: url(“http://www.hillcapitalcorp.com/wp-content/uploads/2015/08/HCC-STR-Train.jpg”);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    }
    }

    The white space is gone now, but the image does not scale responsively.

    #207155
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    You can use a different background image for that resolution, this way will also load a smaller image with maximum of 767px

    Just replace the url below for the reduced image.

    @media only screen and (max-width: 767px){
    .alt-bg.alt-five {
        background-image: url("http://www.hillcapitalcorp.com/wp-content/uploads/2015/08/HCC-STR-Train.jpg");
    }
    }

    Hope it helps.

    -Rui

    #208239
    hillcapital
    Member
    Post count: 74

    Hi Rui,

    I used the new code you provided and added a smaller sized photo but its still not working. The image still doesn’t scale. Would it be possible if you or someone go into my website and fix it for me?

    Thanks

    #208390
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Remember to override your min-height and set the background size to cover for that. Working example:

    @media only screen and (max-width: 767px) {
    .alt-bg.alt-five {
        background-image: url("http://www.hillcapitalcorp.com/wp-content/uploads/2015/08/HCC-STR-Train-8001.png");
        background-size: cover;
        min-height: auto!important;
    }
    }

    Thanks.

    #208655
    hillcapital
    Member
    Post count: 74

    Ok, I updated with the new code. It works well on my desktop browser when I resize it, but with my phone, I can only see the word Transparent in the image and it is still large.

    #209065
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    The code provided is specifically for small screens, it works great for me on my iPhone6. What device version do you have?

    Have you cleared your iPhone’s safari cache?

    – David.

    #209316
    hillcapital
    Member
    Post count: 74

    Hi David,

    I have an Android (Samsung S6). I’ve cleared cache but the image still doesn’t scale. I’ve attached an image of how it currently looks on my phone.

    Attachments:
    You must be logged in to view attached files.
    #209708
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    This seems specific to your device, as I do not have this device it’s very hard for me to test it.

    My last thought is to target your devices screen dpi, can you add this and clear your device cache also.

    @media (min-resolution: 577dpi) {
      
       /* Samsung S6 */
      .alt-bg.alt-five {
        background-image: url("http://www.hillcapitalcorp.com/wp-content/uploads/2015/08/HCC-STR-Train-8001.png");
        background-size: cover;
        min-height: auto!important;
       }
    
    }

    Thanks.

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register