Hello there, I've been dealing with a CSS issue lately. I'm trying to center my div tag on the page using margin-right: auto and margin-left: auto, but for some reason, it's not working as expected. I have looked for solutions online, but I can't seem to find any errors in this simple piece of code.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
body {
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
margin-bottom: 0px;
}
#container {
font-family: Georgia, "Times New Roman", Times, serif;
background-color: #666;
height: auto;
width: 800px;
margin-top: 0px;
margin-right: auto;
margin-left: auto;
}
</style>
</head>
<body>
<div id="container">
Hello universe!
</div>
</body>
</html>