Responsive Sidebar Designing using HTML and CSS.

 RESPONSIVE SIDEBAR DESIGNING.



                                                         We have designed a responsive  sidebar. You should see the video we given in OUTPUT . You will get better Idea about our code. As you open our code on mobile devices you will find that there is little bit animation with Bar icon in Output.


PROGRAM SOURCE CODE :-


1) HTML Coding :-



<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>Sidebar Design By Me</title>
    <link rel="stylesheet" type="text/css" href="../CSS/mysidebar.css">
</head>
<body>
    <div class="head">
    <h1>My Dashboard</h1>
    <input type="checkbox" name="check" id="i">
    <label for="i">
        <div class="bar a"></div>
        <div class="bar b"></div>
        <div class="bar c"></div>
    </label>
    <div class="nav">
        <ul>
            <li><a href="#" class="active">Home</a></li>
            <li><a href="#">About US</a></li>
            <li><a href="#">Services</a></li>
            <li><a href="#">Contact Us</a></li>
        </ul>
    </div>
        </div>
</body>
</html>




2) CSS Coding :-



*{
    margin:0px;
    padding0px;
    box-sizingborder-box;
}
body{
    background-image:url("../Images/a.jpeg");
    height:100vh;
    background-sizecover;
    background-positioncenter;
    overflowhidden;
}
html{
    font-size62.5%;
    /*1rem = 10px*/
}
.head{
    width100%;
    color:#ffffff;
    background-color:orange;
    font-familycursive;
    padding1rem 0.6rem;
    positionrelative;
}
.head h1{
    font-size4rem;
}
.nav{
    width100%;
    positionabsolute;
    top:15%;
}
.nav ul{
    floatright;
    displayinline-flex;
    margin0.7rem 3rem 0rem 0rem;
}
.nav ul li{
    list-style-typenone;
}
.nav ul li a{
    text-decorationnone;
    color#ffffff;
    padding1rem 2rem;
    font-size2.5rem;
    background-color
}
label{
    width:5rem;
    height:3rem;
    positionabsolute;
    right1rem;
    top:20%;
    cursorpointer;
    z-index110;
}
.bar{
    height0.5rem;
    transitionall 0.3s linear;
    background-color#fff;
    displaynone;
}
.bar.b,.bar.c{
    margin-top8px;
}
.active{
    background-color:rgba(199,0,199,0.9);
    border:1px solid #009;
    border-radius30px;
}
input{
    displaynone;
}
@media(max-width990px){
    html{
        font-size50%;
    }
    .head{
        background-color:red ;
    }
    .nav{
        z-index-1;
        top:100%;
        left0%;
        background-color:#111000;
        transitionall 0.3s ease-in-out;
        transformtranslateY(-200%);
    }
    .nav ul{
        floatleft;
        displayblock;
    }
    .nav ul li{
        width100%;
        padding :4rem 0rem;
        text-align:center;

    }
    .bar{
        displayblock;
    }
    #i:checked~.nav{
    transformtranslateY(0%);
    #i:checked~label>.bar.b{
    opacity0;
    }
    #i:checked~label>.bar.a{
        transform:rotate(130deg);
        margin-top20px
        }
    #i:checked~label>.bar.c{
    transformrotate(-130deg);
    margin-top-15px;
  }
}





OUTPUT :-






( NOTE : - While executing program you have to replace links of images , audio's  or video's in this program by your links. So take care of it ! )