Video/image Background for several screen sizes

Hello,

I am still struggling with a video background for different screen size. Several questions:

  1. Is there a way to have a video background for a few screen sizes and an image background for other screen sizes? If yes, how? I tried something like this with no success:

     /*Background Image for different screen sizes*/
     @media (max-width: 480px) {
        #x-section-1 {
           background-image: url('https://e-marketingmix.fr/wp-content/uploads/2017/12/Amelioration-chiffre-affaires-ecommerce.jpg') !important;
        }
     }
    
     @media (max-width: 768px) and
     (min-width: 481px){
        #x-section-1 {
           background-image: url('https://e-marketingmix.fr/wp-content/uploads/2017/12/Amelioration-chiffre-affaires-ecommerce.jpg') !important;
        }
     }
    
  2. Can I have a different video background according to the screen size?

Thanks,
Antoine

Hey Antoine,

Regretfully, that is not a feature offered in X and Pro. That would require custom development which is outside the scope of our support. You will need to hire a developer for that.

Thank you for understanding.

Thanks for the info.

If I use one video for all sizes. Can I then do so that the video won’t be fullwidth on small screens? But simply displayed for a part of the size? It however looks really strange when it is displayed in fullwidth as the height is not passend at all.

URL: https://e-marketingmix.fr/ (first section of the homepage)

Thanks.

That is weird because the video background should cover the section. And, the poster image should show up in mobile and the video will be disabled. Please update Pro to the latest version and give us access to your WordPress admin so we could check your setup.

Thanks.

I’ve updated Pro and the video cover now the section. The poster image is not on mobile though. It would be great if you could tell me how to solve the problem.

Thanks.

I checked your poster and it is blank.

I replaced it with one of your images and it works.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.