Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #681396

    Hey,

    I’m using a color section in my webpage with an image in the background (watercolour green paint). I would like this image was responsive, so when the page is seen on devices the image reduce proportionally. How can I achieve this?

    Thanks,
    Edu

    #681743

    Hi edupuntoes,

    It looks good on my end, could you try to explain a bit further what you are looking to achieve please?

    Best regards,
    Rikard

    #681770

    Hi Rikard,

    I’m trying to decrease the size of the watercolor paint image when I see it on the phone screen to adapt to a small screen dimensions. Right now when I see this webpage on my phone screen the size of that image is huge and almost fill the whole screen, I want to decrease the size of this image proportionally when I see on my phone screen. Do it responsive.

    I don’t know if I can explain well. Please let me know if you know further information.

    Best,
    Edu

    #681781

    Well your background image you have to know the aspect ratio. If you know that you can try to obtain your desired look by calculating the hight.

    First: do not set in the color-section dialog a min-height !
    Set your background image to “scale to fit”
    on my test page (page-id is 2981 here) the aspect ratio of the image is 350px : 1500px
    that means image-height is nearby 23.5% of the image-width

    the css rule than is:

    .page-id-2981 .avia-full-contain {
        background-size: 100vw;
        height: 23.5vw;
    }

    See example here: http://webers-testseite.de/ikom/circles/

    You have to set some media-querry solutions for the content of that color-section

    vw and vh are video-screen width and height ! viewport units are good supported now: Link

    but to make it specific and not for all either you give the color-section a unique ID or custom class or (see above) do that only for that page.

    if you got an overlay color – you have to set the same parameters to that class:

    .home .avia-full-contain, .home .av-section-color-overlay-wrap {
        background-size: 100vw;
        height: calc(66.7vw);
    }

    see here: http://webers-testseite.de/ikom/
    but you see this works for simple layouts – on that start page there is an overlapping container following etc. pp. in that case there has to be more adjustments to make

    • This reply was modified 8 years, 2 months ago by Guenni007.
    #681794

    btw: on that home page above the start page with an aspect ration of 66,7% is ugly.

    on common screens with 16:9 ( the aspect ratio is 56.2%) everything over this ratio is not so nice!
    So best is to use suitable background-images with a “panorama-look” with aspect-ratios under 56%

    #681833

    Hi!

    Once again @Guenni007 has nailed it with his reply.
    Please do follow his steps and if there is an issue, let us know and we will see how we can help further.

    Thanks a lot for your understanding and patience

    Cheers!
    Basilis

    #682083

    oh sorry i see above that i have used one time the calc instruction. This is not necessary. Just use hight: 66.7vw – and so on.

    #682084

    Hi Guenni and Basilis,

    Thank you very much for your incredible help! It’s the first time that I hear about viewport units. I will proceed as you suggest. I will let you know if I have some trouble.

    Many Thanks!!

    #682471

    Hi Edu,

    Great, please let us know if you should need any further help on the topic.

    Regards,
    Rikard

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