• Resolved zbyneksmetana

    (@zbyneksmetana)


    How to center background video in section ? In section we have option “Style -> Background -> Background type and we can choose “Background Video”. Is it solution to top-center this video (position this video is always left aligned). Unfortunately option “Background Video” dont have position option like “Classic” option with image position/attachment/repeat manipulation. Is it reasonable css solution to this problem ?
    Thanks,
    ZBynek
    PS. sorry for language mistakes

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi ZBynek,
    We don’t offer video alignment. Check out this guide: https://stackoverflow.com/questions/27850472/html5-video-background-keep-center-of-video-in-center

    In case someone is looking for a solution and comes across this.

    Adding the below css to style.css of a !Child Theme! seems to have fixed the alignment issue for me, now all section background videos are centered on x and y axis when set to “Fit To Screen”. The devs used similar code, but only for the y axis, probably because it breaks some other layout so— (WARNING: this has NOT been tested with video background layouts other than “Fit To Screen” and may break alignment for background video layouts other than “Fit To Screen”)

    If your theme supports it, you can target only certain pages by adding .body.page-name tag before the other tag (where the page-name is the name of the page you are targeting) this way it will only affect that particular page.

    .elementor-background-video-embed {
        top: 50% !important;
        left: 50% !important;
        -webkit-transform: translate(-50%,-50%) !important;
        -ms-transform: translate(-50%,-50%) !important;
        transform: translate(-50%,-50%) !important;
    }
    • This reply was modified 6 years, 11 months ago by strider2704.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to center background video in section ?’ is closed to new replies.