Slide Out Navigation | HTML, CSS & JavaScript
HTML-код
- Опубликовано: 21 окт 2017
- This Tutorial Gives You The Basic Idea How You Can Create Your Own Custom Sliding Navigation By Writing Only Couple Of Lines JavaScript Code !!
--------------- Social Media ---------------
Facebook : / codegridweb
Instagram : / codegridweb
Twitter : / codegridweb
Thank You For Watching !
Music :
LAIRE - Final Coming : • [Chillstep] LAIRE - Fi...
Credits :
LAIRE :
/ laire
/ laire_music
/ lairemusic
Thanks! I was searching for tutorials of it and all the others were too complicated and would need bigger changes on my css. Keep doing your great work!
Thanks a lot for the post. Your posts are very helpful!
Excellent video. Thanks for the consistently great work.
Thanks bro!
workedd thanks dude
Thanks a lot. I found it.
So if I want to put a picture as the three bar menu instead, I just define the width and height of the btn-toggle and set the image as a background-image on css?
Nice short and simple 👏
Many thanks
*Thx for link in description!*
Yes...
Codes:
* {
margin: 0px;
padding: 0px;
}
#sidebar {
position: absolute;
width: 300px;
height: 100%;
background: #000;
left: -300px;
transition: .4s;
}
#sidebar ul li {
list-style: none;
color: #fff;
font-size: 20px;
padding: 26px 24px;
}
#sidebar .toggle-btn {
position: absolute;
top: 30px;
left: 330px;
}
.toggle-btn span {
width: 45px;
height: 4px;
background: #000;
display: block;
margin-top: 4px;
}
#sidebar.active {
left: 0;
}
Home
Work
About
Contact
function show() {
document.getElementById('sidebar').classList.toggle('active');
}
thanks for saving my time dude💗
What is the problem when it saids show is not defined
Run nhi ho rhi notepad++ sr
Try this, it is the fixed version:
* {
margin: 0px;
padding: 0px;
}
#sidebar {
position: absolute;
width: 300px;
height: 100%;
background: #000;
left: -300px;
transition: .4s;
}
#sidebar ul li {
list-style: none;
color: #fff;
font-size: 20px;
padding: 26px 24px;
}
#sidebar .toggle-btn {
position: absolute;
top: 30px;
left: 330px;
}
.toggle-btn span {
width: 45px;
height: 4px;
background: #000;
display: block;
margin-top: 4px;
}
#sidebar.active {
left: 0;
}
Home
Work
About
Contact
function show() {
document.getElementById('sidebar').classList.toggle('active');
}
*Not to take his credits*
thanks man
Brilliant
Very nice video but which IDE are you using here
Thank you!
Thanks 😊
Thanks
Nice👌
great video bruh
Which IDE you used?
is it possible that the button to 'extend out' remains in the same place?
My JS won't work, do I need another package than "script" (atom)
But what about when we scroll the body? wouldn't menu will stick position? we need follow menu div while we scroll on view.
Tnx
code doesnt work, the button thingy wont open my slide menu, ive written everything as it is and TRIPPLE checked EVERYTHING. idk whats up but if anyone can help lmk
it works but the scroll bar never hides . the whole block goes to the side and the scrollbar appears what to do?
Really! did you can find out how hides it?
Change the Following
on the #sidebar, change position to *position:fixed;* and add a line * overflow-x:hidden; *
on the #sidebar.active add a line *position:absolute*
This is a fix on the current code but there are more efficient ways to create menus like this
my sidebar come only when i press it. how i can solve tis problem?
Can't be download. ...
M a Student and can't afford net.. 😕
But you. ...😥
. Can't understand...
code me dont working
Why ain't my js working
yes me to
add this below head tag
I want to find a video where it comes from the TOP of the screen
Hey I am also looking for an example of a vertical slide menu. Did you already found a solution?
You can do it this code just change the transform property accordingly. Also here’s a piece of advice - if you want to get good at this don’t just copy code. Once you complete tutorial project mess around with it and make it how you want it. It’s the only way you’ll get good using this format. YW
three dots is not showing . what to do????
Same here also
@@freedomgabriel It will probably be your class & ID element in html. It needs to be id for the sidebar and class for the toggle-btn
pls use human frndly music and volume also
Noo
@@codegrid xD
@@codegrid chad
How come my's not workiing dude there is something missing?
🙄
Thanks