I've been struggling to align a "Sign Up" box in the center of the screen, but all my attempts keep pushing it to the left side of the page. Currently, I'm focusing on centering the "Main Content."
https://i.sstatic.net/PmGci.png
Within my .html and style.css files, this is what I have:
.signbox {
position: fixed;
top: 50%;
left: 50%;
margin-top: -50px;
margin-left: -100px;
}
<div class="singbox">
<h2>Main Content</h2>
<p>Other info about the site goes here</p>
</div>
I attempted to follow a solution from a website, as shown in the screenshot provided, but unfortunately, it's not yielding the desired results. -> https://css-tricks.com/quick-css-trick-how-to-center-an-object-exactly-in-the-center/