Chciałem wyśrodkować menu poprzez maring-left auto margin-right auto ale zjeżdza troche na prawo to kod:
body {
margin: 0;
background-color:black;
}
ul {
width: 100%;
float: down;
list-style:none;
font-family: 'Anton', sans-serif;
}
li a{
float: down;
display:block;
width: 20%;
text-align: center;
padding: 20px 20px;
text-decoration: none;
color: white;
margin-top: 5px;
margin-bottom: 5px;
background-color:blue;
margin-left:auto;
margin-right:auto;
}
li:nth-child(1) a {
background-image: url("img/menu1.png");
background-size:100% 100%;
background-repeat: no-repeat;
}
li:nth-child(2) a {
background-image: url("img/menu2.png");
background-size:100% 100%;
background-repeat: no-repeat;
}
Przy okazji jak zrobić aby to menu było na środku ale tak centralnie na środku?