Skip to main content

Adding Our Dropdown to the Website

Lesson 67 from: Build a Responsive Website Using HTML5 & CSS3

Daniel Walter Scott

Adding Our Dropdown to the Website

Lesson 67 from: Build a Responsive Website Using HTML5 & CSS3

Daniel Walter Scott

buy this class

$00

$00
Sale Ends Soon!

starting under

$13/month*

Unlock this classplus 2000+ more >

Lesson Info

67. Adding Our Dropdown to the Website

Lessons

Class Trailer

Getting Started

1

How This Class is Structured

01:41
2

What to Download

02:57

Introduction to HTML & CSS

3

Creating Our First Webpage

05:55
4

What is HTML5 & CSS3

08:24
5

Head vs. Body vs. Html Tag

09:01
6

Title & Description

05:54
7

What Code Editor Should I Use

02:42
8

Using Diy Tags

06:26
9

What is a CSS Class

09:05
10

How to Create Nested Divs

05:03
11

Class Project

05:24
12

External CSS

09:07
13

Creating Our Index Style Pages

12:16

Project 1: Restaurant Website

14

Testing Your Website

08:47
15

Check Your Code For Errors

11:01
16

What are HTML5 Structure Tags

05:47
17

Add HTML5 structure elements

16:02
18

How to Set the Color of the Background

05:10
19

Adding Images to a Website

04:38
20

How to Center an Image

01:14
21

Change the Font Size & Color

14:11
22

Make a Clickable Link

08:45
23

Stretching Background Image

05:38
24

Making a Div Tag Transparent

02:36
25

Simple Website Text Navigation

06:43
26

CSS Compound Classes

07:02
27

Class Project 02

02:05
28

Class Project 02 - COMPLETE

04:48
29

Add an Email Button to a Website

03:49
30

Add Google Maps to Your Website

11:25
31

Making a Website Live

16:50
32

Uploading via SFTP

11:50
33

Setting Up Our New Project

03:46

Project 2: Bike Repair Website

34

CSS Reset

15:22
35

Min-height vs. Height

07:01
36

Div Tags Onto One Line

05:23
37

Getting div tags onto one line using Flexbox in HTML & CSS

05:23
38

Evenly Spaced Div Tags

04:42
39

Two Div Tags of Different Sizes

07:13
40

Vertically Center Content

07:20
41

Class Project 3

02:51
42

Class Project 3 - COMPLETE

05:39
43

Change Default Fonts

04:19
44

Installing Google Fonts

12:44
45

What are PX & EM & REM

14:56
46

Change Line Height

04:33
47

SVG vs. JPG vs. PNG

07:04
48

How to Create a SVG, JPG, or PNG

11:00
49

Block Images vs. Background Images

08:32
50

Finishing Up Our Cards

09:10
51

Icons via Font Awesome

16:31
52

Making a Div Container Clickable

09:55
53

Box-sizing & Border-box

06:19
54

How to Make A Colored Button

07:46
55

Why Can't I Add Margin or Paddding

11:08
56

Rounded Corners

04:17
57

Drop Shadows

06:24
58

Backup Your Website

05:00
59

Reusing a Button Class

03:10
60

Class Project 04

02:58
61

Class Project 04 -COMPLETE

05:45
62

Adding a Horizontal Rule

03:51
63

Make Divs Wrap Onto Separate Lines

12:14
64

Hover Color & Animating a Button

03:33
65

Pseudo Classes

09:31
66

Simple Dropdown Navigation

20:04
67

Adding Our Dropdown to the Website

14:50
68

Useful Shortcuts and Tips in VS Code

13:28
69

Large Background Image

09:24
70

How to Connect 2 Pages

10:42
71

Simple PHP Form Work

17:49
72

Placeholder Form Text

05:46
73

Form Check Marks

03:04
74

Multi Line Form Text Box

02:18
75

Form Radio Button

06:07
76

Form Drop Down Menu

05:48
77

How to Style Your Form

12:55

Project 3: Responsive Portfolio Website

78

What does responsive website design mean

04:17
79

How to change a website layout size color when at different sizes using media queries

11:28
80

How to test your website on a tablet or mobile phone from Visual Studio Code

06:00
81

How to change the layout of a responsive website for mobile vs desktop

16:02
82

How to turn things on and off for mobile tablet & desktop responsive websites

06:03
83

What is pixel density responsive images pixel ratio dp px in webdesign

14:47
84

How to export responsive images for website from XD Photoshop Illustrator

05:11
85

How to add responsive images to website using 100% width in HTML & CSS

06:08
86

How to use srcset to change images in HTML for responsive website

11:18
87

How to add a css style to the first line of a p tag on a website (

11:18
88

How to make the header footer full width but the inside centered

05:36
89

Class Project 05 – Header design

03:12
90

Class Project 05 – Header design COMPLETE

06:25
91

How to use a span tag or span class in HTML to change text

10:32
92

How to pin the navigation to the top of a website fixed nav

03:17
93

How to make a simple responsive mobile menu using CSS only

08:21
94

What is Javascript vs Jquery in website web design

06:35
95

How to make a burger menu 3 line mobile navigation for a website

15:11
96

How to switch a menu nav from desktop to mobile phone

21:45

Project 4: Bootstrap Yogurt Website

97

Overview of what Bootstrap 4 is in website design

07:57
98

How to install Bootstrap 4 on a website using Visual Studio Code

06:27
99

Quick overview of how the Bootstrap Grid Layout works in VS Code

10:49
100

Quick overview of how Bootstrap Components works in VS Code

09:23
101

Quick overview of how Bootstrap CSS Styles works in VS Code

08:20
102

How to customize the default Bootstrap 4 css styles

13:51
103

How to use Bootstrap Layout Grid Experiment 1

10:20
104

How to make 100% header & uneven widths in Bootstrap 4

07:16
105

How to create uneven col widths in Bootstrap 4

07:27
106

How to add padding & margins using Bootstrap 4 in VS Code

12:03
107

How to change layout of Bootstrap depending on mobile or desktop

15:46
108

How to turn things on & off on your website using Bootstrap 4

05:30
109

Google Chrome Inspect

12:40
110

Add Shadows to Text & Boxes

07:06
111

Change the Default Buttons

06:16
112

Responsive Images in Bootstrap 4

09:34
113

How to Center Text & Div Tags

04:16
114

Customize the Bootstrap Navbar

07:29
115

Add Your Own Logo

03:58
116

Change the Default Nav Styles

12:12
117

Fix the Navigation to the Top

04:41
118

Col Images & Col Background

07:56
119

Bootstrap Border & Rounded Corners

04:20
120

Bootstrap 4 Carousels

05:13
121

Card Groups

03:29
122

Drop Shadows On Bootstrap Cards

02:25
123

Clickable Boxes in Bootstrap 4

04:02

Final Quiz

124

Final Quiz

Lesson Info

Adding Our Dropdown to the Website

Hello. Good looking Web designer. We are going to basically take the techniques from the last video instead of doing it in an isolation, we're gonna do it to our own site. Okay. We're gonna drop down menu and kind of integrating into an existing site. And it's going to help reinforce what we've learned but also pick up a couple of quirks that happens when you're kind of you're working in a bigger example. Alright. Let's jump in and work out how to get it going. Alright. So we've closed down the last project. Let's open up index and we kind of reset everything because sometimes it's good to just remember how it all gets going. So open up index. You can double click to open up a second file. So double click them both, they open up separately, then stars dot CSS this tab, drag it over here. The html. I like to turn my rapping back on, sort of wraps around. And I'm going to drag you over there. Alright. We said okay. So we're gonna do it again, but we're gonna show you some shortcuts as we...

ll. Because what we did is we created a nav and then we created just a tags with these classes on. But remember in the last video we can't just use the a tags, we need to wrap them up in a div tag. Okay. To wrap things, you can just start typing it in here and you can say actually I want to put Devyn here, called we call it NEV button. Okay. That would work. Okay. But then the device is there and I can cut it and I can put it after my A there and you can kind of see that the slow process there. So you ready for a shortcut game. So what we do is you highlight this fella. Okay. We're gonna wrap around selection so I'll show you the long way you go to view and go to command palette. We've used him before. Once this guy does everything, it's like the do it all. Okay. What we're looking for is there should be this, is it greater than symbol there? Okay. Well the closing square brackets and in here is a bunch of stuff mine's got recently used. That's the one I want to wrap with abbreviation. Okay, that's the one I want but you won't have that there. You start typing rap. Okay. And it cuts it down to the things you can do that. Have the word wrapping it and we want this on with abbreviation. Okay, I'll show you the long way now. This is the abbreviation. Now think abbreviation is I want to what do we want to name this tag And I'd like to wrap it up in a div tag called nav button. You're gonna see what it's doing down there. Look how handsome that is, enter to confirm. Done. Nice. Huh? Okay. So it's just a real handy thing. Let's look at doing it one more time with a slightly with a little bit of extra shortcuts highlighted. Okay then on my Mac. I go command shift P. I'm assuming on a Pc. It's control shift P. If you're not sure, go to slick view. It's whatever shortcut is there on your Pc. Okay, so I'll go back let's try and get the flow going down. Alright. So I wrapped it up feeling good. Command shift P. And then I go because it's already there. I don't have to do anything. You could type trap. Okay. I'm making this slow but I can just hit return on my keyboard and then go all right, I want to wrap this up in Nav button. Okay, Nav button smoothed in. He totally destroyed that I wasn't watching. Alright. Ready for the flow. Alright, flowing, highlighting it, commands your P wrap with abbreviation. Put in NEV but in had returned ah look at that, that was better highlight this guy, command shift P. Return. And let's put in a dot. Let's put a knob button and we're doing some cool wrapping and you can see it indented it, see when I talk slowly. Did that help for anybody? Maybe not. Alright, so I'm separating it out just to kind of be very clear what we're doing. So we've got our three buttons. We've wrapped them all up in a div tag. Let's have a little look at what we've ended up with. So I'm gonna open my ports and because I kind of working on something else I'm gonna basically close it and then open it back up again. It's gonna open up on this video over here and I've broken everything. So we totally broken lots of things with our code so we're going to go through and I guess that's why I wanted to do it is its own separate window. So if you're doing at the beginning it can be easier. But when you're adding things in later on there is this packing going on to try and repurpose or re fix it? So actually we've used that button already. Let's just get rid of it off here in case of these a tags because it's applying twice. Right? We've got trying to do it twice. So we don't need it on these a tags is more because we're using it on our div class so I will get rid of all of this. I'm gonna hit command d to get rid of that one or we don't almost I'm gonna use my multi cursor. I'm holding it on my option key on a Mac. Ok. Or OK. On a pc. So now just got plain old classes wrapped in these tags with that same style on it. Let's have a look now better. Alright, next thing let's get them stacked side by side. Okay. So we're going to say you my friend. Who is that? Never button? Do we have a class for never button. Okay, so never button is going to be what are we gonna call him? We're going to say he is display Okay and he's blocking at the moment so he's stacking onto a virtual so the other one is in line block. There he is there. They should line up next to each other. Cool. Now we're going to do that. Drop down menu. Okay it's going to be inside this book online we're gonna hover above it and it's going to fall out. So let's look at the code let's find book online. It's inside this div tag called nav button so the beginning the opening so just after the a tag is where I'm gonna put everything I'm going to put in a few returns to make it look nice and we can now just do that, grab that one, Copy it and put three buttons in. Okay that actually works okay but there's nothing wrong with that. Okay the tags open and they close but the tabbing is all weird. Okay so I could right click it and say let's format the selection but I want to try and be fancy and ho nail skills to try and this is like only do this stuff when people are walking past behind you and you're trying to impress them. That's what I do because it takes me a little while to work out okay that I want I would like a div tag called nav button. Okay. Inside of that. Okay I'd like some eight tags and then how many do you want? You want three? Okay and I know that's not gonna work but let's just say let's do it. You're like huh? I kind of did what I said I said do and have button and then just times the A. By three. So what you can do is you can wrap all this up. Okay you can say open brackets, closed brackets so do all of this and then times them all by three not just the A. All of them. Okay and sometimes you need to delete that last bit. Three type it back in. So the abbreviation pops back up. Hit return. Hey we're doing stuff okay. Multi curses. We're gonna put in hash we're gonna put in the three little bits. Okay so I'm gonna grab it from my ah the text I've got in your exercise files okay. And inside the a tag and I paste that parts delivered. The last one is going to be request callback. Okay I got all of them, mostly in the right places ever look what end up happening. Yeah so you're inside worked out. Okay But I know that this needed to go inside the a tag there. Now the cool thing about it is that this div has an a tag inside of it. Okay and it's exactly the same as doing it this way. Okay where we've got a div with an a tag inside of it. It's exactly the same. Just looks a little different here. Okay. Especially when I've broken it. I didn't break it. It's just folded onto two lines. Let's make this a little wider so it all fits all right. So we've got these guys, what do you want to do to them? We want to turn them off because at the moment they're appearing okay but who have I broken something I did. Good old venus code helped me putting a closing dip just there, which is not what I wanted. There we go. So it all looks nice. Now let's turn these guys off so these guys need to be inside something I can turn off because it's not we're going to use our super handy dandy. Remember the long way view command palette but we're gonna use a shortcut ready? I'm trying to impress. You hear? Command shift P look at that. Just hanging out. The last thing recently used was Emmett Great. I'm going to type it in. I'm going to call this one. Drop down. Ah look at that he'd return again. How casual look at us wrapping tags looking good and denting. Okay. And let's turn it off. So we're going to say drop down is what I called it is it? And we'll say display none. Go away buddy. So now if I save it all it's gone. I want to turn it back on so I would like drop down drop down. Turn back on please. Okay I'll display block. It turns into a block that we can see but only if Okay, only if this never buttons been hovered over this never button. So if the never button button has a pseudo class of hover, Okay then do this thing and it will override the display from none to become a block. Mm hmm. Hey, it doesn't work well it works but it's the format is a bit weird. Let's try and fix that. Okay. And I guess is how that was done. That was a hard thing because like this is a I only really remember it because I'm a teacher of it. What I end up doing is end up doing it once a working through the tutorial and then copying and pasting it over and over and lots of my projects. I understand how it works, but typing it out every time, that's pretty long. Not even sure how long we're at this video yet, it's probably what I'm guessing. 10 minutes maybe. Maybe not that long. So to get it to position right, okay, we're going to say the position instead of being relative to each other and all of his friends were going to position is absolute alright and hopefully now he kind of he's distanced himself, he's not relative to his buddies and that's kind of working and to get these little guys that pop out to fix them. We need to find our nav never button where he is there. Remember we did this before we said okay now you're a position relative you're gonna work down nice you need to be a little wider. We need to do some centering but that's the basics of it. Right And my Z index doesn't need to be adjusted because this stuff is appearing afterwards. Okay sits on top but we might have to go and say just in case. Okay you might have to say your dropdown menu has a Z index of one. Okay just to get him or 99 just above zero. What do you want to do now is we wanted to push down a bit so we're going to say this drop down menu now we're not gonna use margin remember because margin left a gap that this thing closed. So we're gonna use petting, what are you petting padding top. Okay and we'll add a bit how much pixels. Let's see how that goes. Get in there. Okay And we want to center all these knobs buttons. Okay so all of you guys can I do it just to the drop down box. So these guys are all fine because they fit within their little boxes. But this guy here we might have to say we'll try it together so it takes the line can be center. Yeah that for all the little internal guys as well so that's nice we might make those boxes wider. So the dropdown menu is going to be can we do it to the drop down menu? I doubt we can. If we say with We're learning together with of let's say 200 pixels just to see if we can do it. Cool. It is kind of yeah, it's totally working but it's not forcing them to be a size, it's giving the box nice and big and it's allowing them to be whatever size they like and that could work if it's just text but it's kind of making the boxes weirdly size. So yes and no it worked. So we're going to need a compound selector to say I would like the I want to start these never buns but not all of them. Just the ones that are inside of the dropdown. Okay, so we use a space to say this thing inside of this thing you're getting the hang of it right? So I would like to say that as a width of Width of 100 pixels but it was big enough to fit all these guys not big enough. 200 pixels. Probably too big a lift the two off count too fast. Here we go. I totally did it the wrong way around. Okay, so it's not drop downs that are inside never buttons, it is the knave buttons that are inside the dropdowns Happens to the best of us. Here we go now the 200 pixels and too big. Okay, so maybe 90. It's not big enough. 1 20. Alright, that's perfect dish. Maybe a little bit bigger. I'm gonna leave that on two lines and if we wanted to because those lines are joining, I could use margin but it's going to open up a little gap so I might just say the background background color of these guys are going to be a background color, it's gonna be slightly different. We're going to use white. Okay, so they're all white color of the text. Okay, so colored by itself. Remember changes the color of the text. I'm going to use this. Ah not working so it has to be not you. Alright, should have left it there but let's learn it. So if there's a drop down inside I'll put the colors down here. Ok. And I'm going to say I'd like this but I want there to be an a tag. Okay, that's inside of an on button that's inside of a drop down. I want you to do a color of that green. Sorry, that magenta. There you go. We're getting there. Okay, get what I mean? Now I'm just kind of playing around trying to make it look nice. Okay, you can add your hover transition, you can play with your margin kind of moving it over to the left if you want. I'm gonna stop there though because this video is getting along and I'm just kind of mucking about And it is 10 minutes to 11 at night and I'll probably just start waffling. So let's finish up there and I will see you in the morning.

Class Materials

Bonus Materials with Purchase

Exercise Files
Completed Files

RELATED ARTICLES

Recent

Articles

Recent

Articles

Recent

Articles

Recent

Articles

Recent

Articles

RELATED ARTICLES

Recent

Articles