Using my code posted below.
I want to center the div and the text inside to the center of the webpage. My end result is still showing div and content on the top left.
I have tried setting margins to 0 auto.
a {
float: left;
width: 8em;
text-decoration: none;
color: white;
background-color: #0094ff;
padding: 0.2em 0.4em;
border-right: 1px solid white;
margin-left:0 auto;
margin-right:0 auto;
}
a:hover {
background-color: #00ff90;
}
li {
display: inline;
}
div {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
#horizontal-list ul {
list-style:none;
width:10%;
padding-right:20px;
}
#horizontal-list ul li {
list-style:none;
margin:0 auto;
display:inline-block;
}
Html below:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="Sitestyles.css">
<title>blahblah</title>
</head>
<body>
<div id="menu-outer">
<div class="table">
<ul id="horizontal-list">
<li><a href="#"><img src="image.png" onmousedown="return false;" alt="Something" /></a></li>
<li><a href="#"><img src="image.png" onmousedown="return false;" alt="Something" /></a></li>
<li><a href="#"><img src="image.png" onmousedown="return false;" alt="Something" /></a></li>
<li><a href="#"><img src="image.png" onmousedown="return false;" alt="Something" /></a></li>
<li><a href="#"><img src="image.png" onmousedown="return false;" alt="Something" /></a></li>
</ul>
</div>
</div>
</body>
</html>