HTML:
<section>
<div class="container">
<div class="content"></div>
</div>
</section>
CSS:
.container {
width: 1000px;
margin: 0 auto;
@media screen and (max-width: 800px) {
width: 600px;
}
}
.content {
width: 100%;
padding-top: 30%;
background-image: url('image.png');
background-position-x: 50% // -----> related to container width???
}
I'm using padding as a percentage relative to the container's width. How can I use the same approach to position the background image?