I try to use focus-within to replace the javascript. But we must click on it to appear the pulldown/drop down. And using left, right, top, bottom; I try to control the direction of the dropdown. It's may be : drop down to left, drop down to right, drop up to left, drop up to right.
@@davidhusted817 I think its not necessary. Because if the anchor is a link with href, so its not have sub menu on it. So its a reguler link thats no need to stop the event bubble. But if the anchor has sub menu, its no need href so no event need to listener. An anchor automatic have behaviour that focused when after clicked. If we want to ensure that, we can use attribute : tabindex="0". So focus-within will automatically show or hidden sub menu.
Hello.. please make a video auto slide image... I dont get what they teach..you are a good teacher and teach the simple understanding way for us.. thank you
hey brother please help,i want to make a dropdown list on a navigation bar what do i do cuz whenever i make a div class its not working as it is insider the header section
Hello, do you know if this will work in a form in Squarespace? Squarespace has a form with a dropdown menu as an option, but I want the drop down menu to be searchable so when you start typing the dropdown menu will only display the words with those characters.
Bro Code
Food
Apple
Orange
Banana
/* style.css */
.dropdown{
display: inline-block;
}
.dropdown button{
background-color: hsl(0, 0%, 80%);
color: white;
padding: 10px 15px;
border: none;
cursor: pointer;
}
.dropdown a{
display: block;
color: black;
text-decoration: none;
padding: 10px 15px;
}
.dropdown .content{
display: none;
position: absolute;
background-color: hsl(0, 0%, 95%);
min-width: 100px;
box-shadow: 2px 2px 5px hsla(0, 0%, 0%, 0.8);
}
.dropdown:hover .content{
display: block;
}
.dropdown:hover button{
background-color: hsl(0, 0%, 70%);
}
.dropdown a:hover{
background-color: hsl(0, 0%, 90%);
}
u r the best tutor , I've searched for many video how to create dropdown , your video is magnificent at all.
I watched 5 videos before this one on the same subject, you were the only one that I actually understood what you were doing, thank you so much
Same here
The best Way to do a dropdown menu. Its so simple. Thanks ❤
I try to use focus-within to replace the javascript. But we must click on it to appear the pulldown/drop down. And using left, right, top, bottom; I try to control the direction of the dropdown. It's may be : drop down to left, drop down to right, drop up to left, drop up to right.
You must to add a third parameter for the addeventlistener to "false" , because the default event is bubbling ,
{From the parent to child}
@@davidhusted817 I think its not necessary. Because if the anchor is a link with href, so its not have sub menu on it. So its a reguler link thats no need to stop the event bubble.
But if the anchor has sub menu, its no need href so no event need to listener.
An anchor automatic have behaviour that focused when after clicked. If we want to ensure that, we can use attribute : tabindex="0". So focus-within will automatically show or hidden sub menu.
personally, the best and satisfying explanation which I could understand bit by bit.
beginner-friendly!
thanks a lot bro.
A simple and quick tutorial. I couldn't need more! Thank you 🙏
04:50 I did not know you can do something like that, thank you!
Hello.. please make a video auto slide image... I dont get what they teach..you are a good teacher and teach the simple understanding way for us.. thank you
You are a real Master, bro! Respect!!
Best Explanation Love From Pakistan
Bro, u r the best!
simple explantion thank you
Thanks for the video!
Thanks bro very helpful
Great lesson. Thank you
Grate video and thank you so much
nice and simple 🔥
Why the paragraph disappeared at the end?
Thank you for this lecture. It really helped me ❤
Nice Video.
Is it possible to change the fonts in drop down menus in Crome? Not using html.
Code or tutorial for ascending and descending for table? You dont have any tutorial for it
hey brother please help,i want to make a dropdown list on a navigation bar what do i do cuz whenever i make a div class its not working as it is insider the header section
what if i want to change the size all in all?
Good👍 website img animation
Hello, do you know if this will work in a form in Squarespace? Squarespace has a form with a dropdown menu as an option, but I want the drop down menu to be searchable so when you start typing the dropdown menu will only display the words with those characters.
bro what if we want to add icons on the drop down, can u please tell ?
Thanks for sharing Bro.
thank you bro God bless
Thank you!!!!!!!💓💕💞💖💗💓
THE BEST THERE IS
thank a lot sir .
ty so much dude lu
Hi can you tell me how can I move the drop-down menu to left(left of the button) it only goes right
in
.dropdown a{
}
try using display:inline-block;
it says the video was released 9 days ago and yalls comments are months old 💀
it was unlisted then went to public again according to some comment
Lol yea, I saw comments 5 months ago but the video is uploaded 2 month ago 😂
Damm
God bless u
Epic bro
thank you
Be blessed
Thanks bro
he is a man of code
Thanks
Thx
Thanks you!
Didn't know that 😅
tao không hiểu tiếng anh
Thanks sir🫡
i luv u
,👌👌👌👌👌👌👌👌👌👌👌👌👌👍👍👍👏👏
His voice I don't like it
thanks