Guten Abend liebe Community. Ich habe gerade ein kleines Problem mit CSS & HTML. Ich wollte dass meine Navigation sich in die Mitte setzt und habe es so ausprobiert:
HTML Code:
Wieso wird der ganze Inhalt nicht in die Mitte gesetzt?
PHP-Code:
body {
font-family: Ubuntu, sans-serif;
background-color: #fff;
}
header {
top: 0;
left: 0;
width: 100%;
height: 120px;
position: fixed;
background-color: #D23333;
margin-left: 0px auto;
margin-right: 0px auto;
}
nav, li {
list-style-type: none;
display: inline;
}
nav, a, a:hover {
text-decoration: none;
color: #fff;
text-transform: uppercase;
}
PHP-Code:
<body>
<header>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
</body>
Kommentar