How to create vertical Navigation Bar Using Html And CSS

Hello friends, today we will be going to how do we Vertical Navigation Bar Using Html And CSS. I have posted many videos and articles before related to the JavaScript project, now this the something new that we are going to build.

Video Tutorial of How to create vertical Navigation Bar Using Html And CSS


As you have seen on the given video tutorial of  How to create vertical Navigation Bar Using Html And CSS, 

If you are feeling bored watching the given video tutorial of How to create vertical Navigation Bar Using Html And CSS then you can copy or download the given codes below:


How to create vertical Navigation Bar Using Html And CSS | Free Source Code

To create this program (Vertical Navigation Bar). First, you need to create two Files one HTML File and another one is CSS File. After creating these files just paste the following codes in your file.

In the first place, make a HTML document with the name of index.html and glue the given codes in your HTML record. Keep in mind, you've to make a document with .html extension.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" integrity="sha512-5A8nwdMOWrSz20fDsjczgUidUBR8liPYU+WymTZP1lmY9G6Oc7HlZv156XqnsgNUzTyMefFTcsFH/tnJE/+xBg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="style.css">
    <title>Navigation bar</title>
</head>
<body>
    <header class="header">
        <ul class="icon-menu">
            <li class="icon-box">
                <i class="fa fa-home" aria-hidden="true"></i>
                <a href="#">
                    <h2>Home</h2>
                </a>
            </li>
            <li class="icon-box">
                <i class="fa fa-user" aria-hidden="true"></i>
                <a href="#">
                    <h2>About</h2>
                </a>
            </li>
            <li class="icon-box">
                <i class="fa fa-briefcase" aria-hidden="true"></i>
                <a href="#">
                    <h2>Portfolio</h2>
                </a>
            </li>
            <li class="icon-box">
                <i class="fa fa-envelope-open" aria-hidden="true"></i>
                <a href="#">
                    <h2>Contact</h2>
                </a>
            <li class="icon-box">
                <i class="fa fa-comments" aria-hidden="true"></i>
                <a href="#">
                    <h2>blog</h2>
                </a>
            </li>
        </ul>
    </header>
</body>
</html>
         
Second, make a CSS record with the name of style.css and glue the given codes in your CSS document. Keep in mind, you've to make a record with .css extension.
*
{
   margin: 0;
   padding: 0;
   box-sizing: border-box;
   font-family: sans-serif;
}
body
{
   display: flex;
   justify-content: center;
   align-items: center;
   height: 100vh;
   background: #111;
}
.header
{
   display: flex;
   justify-content: center;
   align-items: center;
   height: calc(100vh - 200px);
   position: relative;
}
.header li
{
   margin: 20px 0;
   width: 50px;
   height: 50px;
   background: #2b2a2a;
   color: #ddd;
   border-radius: 50%;
   list-style: none;
   display: flex;
   align-items: center;
   position: relative;
   transition: 0.3s;
}
.header li i.fa
{
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%,-50%);
   color: #ddd;
   font-size: 19px;
   pointer-events: none;
   z-index: 2;
}
.header li a
{
   display: block;
   padding: 0;
   width: 50px;
   height: 50px;
   text-decoration: none;
}
.header li a h2
{
   color: #fff;
   font-size: 15px;
   font-weight: 500;
   line-height: 50px;
   height: 50px;
   padding: 0 25px 0 30px;
   position: absolute;
   top: 0;
   right: 0;
   text-transform: uppercase;
   transition: 0.3s;
   opacity: 0;
   z-index: -1;
   border-radius: 30px;
}
.header li:hover a h2
{
   background: #ffb400;
   opacity: 1;
   border-radius: 30px 0px 0px 30px;
   right: 27px;
}
.header li:hover,
.header li.active
{
   background: #ffb400;
}
That’s all, now you’ve successfully created a program to How to create vertical Navigation Bar Using Html And CSS. If your code doesn’t work or you’ve faced any error/problem, please download the source code files from the given download button. It’s free and a .zip file will be downloaded then you’ve to extract it.
Click on the following download button to download all source code files.


Download Now
Please Wait...
Direct Link click here.

How can I help you

Post a Comment

How can I help you

Post a Comment (0)

Previous Post Next Post