Skip to main content

Simple Navbar With Flexbox in HTML, CSS| Create a Navigation Bar with Flexbox [Free Source Code] No Talking





HTML

<!DOCTYPE html>
<html>
    <head>


        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>Music App</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="css.css">


    </head>

    <body>


        <div class="header1">

          <div class="head2">              
             <h1>SkyCodingLab</h1>

            </div>
            <div class="head3">

                <ul>
                    <li><a href="#">Home</a></li>
                    <li><a href="#">About Us</a></li>
                    <li><a href="#">Our Service</a></li>
                    <li><a href="#">New's</a></li>
                   <button><li><a href="#">Contact Us</a></li>  </button>      
       
                </ul>
            </div>
        </div>
   
    <section>
       
    </section>


    </body>
</html>


CSS 

body{
    padding: 0px;
    margin: 0px;

}

.header1{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    padding: 5px 80px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.515);
    border:1px dotted #fff;


}



.head2{

    height: 100px;
    width: 50%;
    float: left;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    font-size: medium;
    text-shadow: 4px;
    text-indent: 100px;
    color: white;
       
}


.head3{

    float: right;
    width: 50%;
    height: 100px;
   
}

.head3 ul{

    list-style: none;

}

.head3 ul li{
    display: inline-flex;  
    padding: 10px 20px;

}

.head3 ul li a{
    text-decoration: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    font-size: 15px;
    text-transform: uppercase;



}

.head3 ul li a:hover{
    text-decoration: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #C37C8D;
    font-size: 15px;
    text-transform: uppercase;
}



section{
    width: 100%;
    height: 100vh;
    background: url(img/img2.jpg);
    background-size: cover;
    background-position: center;

}
button{
    background: #C37C8D;
    border-radius: 25px;
}

button:hover{
    background: greenyellow;
    border-radius: 25px;
    color: white;
}

Comments