I needed a way to auto-resize an image based on the screen resolution it's being viewed on. After some searching, I came across this code that did the trick:
<!DOCTYPE html>
<head>
<style>
html,body {
height: 100%;
margin: 0;
padding: 0;
background-color : black;
}
img {
padding: 0;
display: block;
margin: 0 auto;
max-height: 100%;
max-width: 100%;
}
</style>
</head>
<body>
<img src="kara.jpg" align="right" />
</body>
</html>
Now, I want to overlay a video onto the center of this image. However, since it's not a background image, I ran into some complications. I tried using CSS background-image property but couldn't achieve the same effect as with the previous code. No matter how many properties like background-size and background-position I experimented with, I couldn't replicate the desired output. Any suggestions would be greatly appreciated!