samedi 26 janvier 2019

I have a problem with this navigation bar.All buttons are moving when mouse hover over it

When mouse hover over the button all of the buttons are moving

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>test</title>
    <link rel="stylesheet" href="css/styles.css">
</head>
<body>
    <nav class="container nav">
        <div>
            Other info
        </div>
        <div>
            main
        </div>
        <div>
            my projects
        </div>
    </nav>
</body>
</html>

/---------------------------css-here---------------------/

body{
    padding:0px;
    margin:0px;
    font-family: Lato,Arial,sans-serif;
    font-weight: bold;
    font-size: 30px;
    background-color: black;
    text-transform: uppercase;
}
.container{
    width:900px;
    height: 30cm;
    margin:0 auto;
    background-color: black;
}

.nav{
    text-align: center;
}

.nav div
{
    background-color: white;
    display: inline-block;
    border: solid;
    margin-left: 5px;
    margin-right: 5px;
    padding: 10px;
    border-radius: 0 0 10px 10px;
    transition: 0.2s;
}

.nav div:hover
{
    padding-top: 25px;
}


I've expected that only one button will move but it isn't I need to write few word here becose stackoverflow doesn't let me post this Also sory for my English if its bad




Aucun commentaire:

Enregistrer un commentaire