Menu Bar



In This Code You Will Learn How To Make Menu Bar




 <!DOCTYPE html>
<html>

<head>
    <link href="../CSS/video32.css" rel="stylesheet" />
    <title>video32</title>
</head>

<body>
    <ul>
        <li id="firstList"><a href="#home">Home</a></li>
        <li><a href="#news">About</a></li>
        <li class="drop">
            <a href="javascript:void(0)" class="down">Services</a>
            <div class="dropdownContent">
                <a href="#">Link 1</a>
                <a href="#">Link 2</a>
                <a href="#">Link 3</a>
            </div>
        </li>
        <li><a href="#contact">Contact</a></li>
    </ul>
</body></html>
                    
                  
                



 * {
    margin: 0;
    padding: 0;
}

body {
    font-family: arial;
    font-size: 15px;
    line-height: 25px;
}

ul {
    list-style-type: none;
    overflow: hidden;
    background-color: #333;
    border-bottom: 2px solid tomato;
}

li {
    float: left;
}

li.drop {
    display: inline-block;
    transition: all 1s;
}

li a,
.down {
    display: inline-block;
    color: white;
    text-align: center;
    padding: 15px 20px;
    text-decoration: none;
    transition: all 1s;
}

li a:hover,
.drop:hover .down {
    background-color: #111;
    transition: all 1s;
}

.dropdownContent {
    display: none;
    position: absolute;
    background-color: #333;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    transition: all 1s;
}

.dropdownContent a {
    color: white;
    padding: 15px 20px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: all 1s;
}

.dropdownContent a:hover {
    background-color: #111;
    padding-left: 50px;
    transition: all 1s;
}

.drop:hover .dropdownContent {
    display: block;
    transition: all 1s;
}
#firstList{margin-left: 950px;}