This issue seems simple, but I've been struggling to find a solution.
<div class="bg">
<div class="container2">
<p> Test content goes here </p>
</div>
</div>
I am facing an issue with two div
elements - one named bg
which contains a background and the other is a container.
<style>
.bg {
background:#0C9;
}
.container2 {
width:800px;
margin:0 auto;
text-align:center;
}
</style>
The problem arises when resizing the browser window width, the background div
shrinks from the right side. Any suggestions on how to resolve this?