Ich verstehe es einfach nicht richtig. Wie zentriere ich die LI (Listen) im UL?Center LI in UL [HTML/CSS]
HTML
<ul>
<li><a href="#">Home<a/><li>
<li><a href="#">Over mij<a/><li>
<li><a href="#">PO's<a/><li>
<li><a href="#">Contact<a/><li>
</ul>
CSS
ul {
width: 1000px;
margin: 0 auto;
padding: 0;
list-style-type: none;
margin-top: 30px;
overflow: hidden;
background-color: #333;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
ul li {
display: inline;
}
li a {
display: inline-block;
padding: 8px 11px;
margin-right: 10px;
color: #FFFFFF;
text-decoration: none;
text-align: center;
font-size: 18px;
line-height: 50px;
}
li a:hover {
background-color: #111;
}
https://jsfiddle.net/3vd3hk8d/
Vielen Dank im Voraus, MisterJ0J0
Was exacty meinst du mit Zentrum in ul? Warum nicht einfach "text-align: center" anwenden? zu ul? – AAGD
Vielen Dank! Ich dachte, ich hätte es versucht, aber es scheint, dass ich es nicht getan habe. – MisterJ0J0