I am having an issue with a div that extends to the edge of the browser, and I want to add content that is aligned to the center of the page within a container. I tried using Bootstrap by creating a row with col-md-6 filled with a background color, but when I add the container, the content aligns to the edge of the browser instead of the container.
Your assistance in resolving this problem would be greatly appreciated. In case my explanation is unclear, I have included an image for reference.
Thank you for your help.
.login-msg-box {
background: rgba(0,0,0,0.5);
margin-top: 200px;
height: 400px;
}
<div class="row">
<div class="col-md-6 login-msg-box">
<div class="container">
<h2 class="msg-heading-line">LOG IN</h2>
</div>
</div>
</div>