Is there a way to set the background of this div to act like a regular 100% image and scale accordingly?
This is my CSS:
.videobackground{
margin-top:-5px;
max-width:1140px;
height:348px !important;
background-image:url(imgs/rpp-behind-the-scenes-hero2bg.jpg);
background-position:center; /* IE fix */
-webkit-background-size: contain;
-moz-background-size: contain;
-o-background-size: contain;
background-size: contain;
}
And here's the HTML:
<div class="videobackground"></div>
Everything looks great on desktop, as you can see in this picture:
https://i.sstatic.net/Tb60L.png
However, when I try to scale the page for mobile, things get distorted, like in this picture:
https://i.sstatic.net/t6VY6.png
If anyone has any suggestions on how to solve this issue, please let me know. I've tried multiple approaches without success. The reason I'm using a background div instead of just an image is because I need to overlay a YouTube embed on the left side.
Thank you!
-Adam