Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1332006

    Hi all, i need to set an image holder to work in the same way as a background image. It needs to be :
    100% full width of browser
    70% of browser height

    Image needs to crop/adjust when browser is resized.
    Basically, it needs to work the same way as the image at the top of this page. which is currently done with a background-image. Buti need to do with with an actual img .

    https://www.dannahcottages.co.uk/cottages/heather/

    any ideas?

    • This topic was modified 3 years ago by adibranch.
    #1332140

    Hey adibranch,

    Thank you for the inquiry.

    There are a lot of images and galleries in the home page. Which specific element are you trying to adjust? Please provide a screenshot (on imgur or dropbox) of the section or image that you would like to adjust, including a mockup of the changes if possible.

    Best regards,
    Ismael

    #1333273

    Sorry, i meant the top image, the one of the outside of the house.

    That image is current generated with a background image on a colour section. I need to use an actual image holder, and still achieve the same full width and object-fit effect.

    #1333489

    Hi,

    Thank you for the clarification.

    You can set the color section’s content container width to 100%. Please check the documentation for more info.

    // https://kriesi.at/documentation/enfold/color-section/#color-section-with-100-content-width

    Best regards,
    Ismael

    #1333783

    Indeed, and thats what’s already done :)
    But, what i want to do is recreate the same full width, 70% height image but using an actual image in a placeholder, rather than a background image on a container.

    #1333993

    Hi,

    Thank you for the info.

    We could define the minimum and maximum height of the image but it might get distorted on certain screen sizes. If that is not a problem, try try this css code.

    img.wp-image-3530.avia-img-lazy-loading-not-3530.avia_image {
        height: 50vh !important;
        max-height: 50vh !important;
        min-height: 50vh !important;
    }
    

    You may need to apply a custom css class name or ID to the image element and replace the css selector above.

    Best regards,
    Ismael

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