NAvigation in der Mitte zentrieren

  • Guten Tag,


    in einer CSS Datei ist die Hauptnavigation linsbündig beschrieben.


    Ich möchte Sie in der Mitte zentrieren und suche nun den Befehl den ich für "left einsetze.


    Weiss jemand weiteR?



    CSS mit linksbündiger zentrierung


    nav {
    float: left;
    width: 100%;
    list-style-type: none;
    box-shadow: 0 10px 5px 0 rgba(0,0,0,0.75);
    position: absolute;
    top: -11px; left:0%;
    display: block;
    text-align: center;
    margin: 0 auto 30px;
    }
    nav ul {
    float: left;
    width: 100%;
    list-style-type: none;
    background: #7C2D48;
    }
    nav ul li {
    float: left;
    }
    nav ul li:first-child {
    margin-left: 2%;
    }
    nav ul li a {
    float: left;
    padding: 16px 0 16px 16px;
    color: #FFFFFF;
    text-decoration: none;
    }
    nav ul li a:after {
    content:" | ";
    color: #ffa323;
    margin-left: 20px;
    }
    nav li a:hover, nav li a:focus {
    background: #6D273F;
    }


    also was schreibe ich anstatt left???


    MfG

  • Versuch es mal so

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!