This is a snippet of the CSS code I'm using for my menu:
ul {
text-align: left;
display: inline;
margin: auto;
width: 50%;
position: fixed;
top: 0;
list-style: none;
}
I've attempted to use auto-margin left and right
, but so far, I haven't been successful in centering the entire page itself.
Below is how I've styled the main 'box' that comes after the menu:
.box {
margin: auto;
width: 50%;
padding: 20px;
background-color: #FFFFFF;
word-break: break-all;
}
You can view the full source code at: https://pastebin.com/56HbfaGM
Another issue I'm facing is that different browsers are rendering the page differently.
I haven't worked much with HTML/CSS in recent years, so forgive me if this seems like a basic problem.
I'm simply looking for more comprehensive methods of centering content.