Learn CSS dropdown menus in 6 minutes! 🔻

preview_player
Показать описание
#CSS #course #tutorial

CSS HTML dropdown menu tutorial example explained
Рекомендации по теме
Комментарии
Автор

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bro Code</title>
<link rel="stylesheet" href="style.css">
</head>
<body>

<div class="dropdown">
<button>Food</button>
<div class="content">
<a href="">Apple</a>
<a href="">Orange</a>
<a href="">Banana</a>
</div>
</div>

</body>
</html>

/* 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%);
}

BroCodez
Автор

A simple and quick tutorial. I couldn't need more! Thank you 🙏

HondaEver
Автор

u r the best tutor, I've searched for many video how to create dropdown, your video is magnificent at all.

Blueperry
Автор

personally, the best and satisfying explanation which I could understand bit by bit.
beginner-friendly!
thanks a lot bro.

Spacetime
Автор

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

smartgadgets
Автор

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.

mswondo
Автор

Thank you for this lecture. It really helped me ❤

okhakhugaruba
Автор

bro what if we want to add icons on the drop down, can u please tell ?

HeroXI
Автор

04:50 I did not know you can do something like that, thank you! <3

ThomasIkemann
Автор

You are a real Master, bro! Respect!!

zahid
Автор

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.

danielleburchett
Автор

what if i want to change the size all in all?

xarloz
Автор

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

megcodm
Автор

Hi can you tell me how can I move the drop-down menu to left(left of the button) it only goes right

Khodepp
Автор

it says the video was released 9 days ago and yalls comments are months old 💀

moyokzm