Adding Our Dropdown to the Website
Daniel Walter Scott
Lesson Info
67. Adding Our Dropdown to the Website
Lessons
How This Class is Structured
01:41 2What to Download
02:57 3Creating Our First Webpage
05:55 4What is HTML5 & CSS3
08:24 5Head vs. Body vs. Html Tag
09:01 6Title & Description
05:54What Code Editor Should I Use
02:42 8Using Diy Tags
06:26 9What is a CSS Class
09:05 10How to Create Nested Divs
05:03 11Class Project
05:24 12External CSS
09:07 13Creating Our Index Style Pages
12:16 14Testing Your Website
08:47 15Check Your Code For Errors
11:01 16What are HTML5 Structure Tags
05:47 17Add HTML5 structure elements
16:02 18How to Set the Color of the Background
05:10 19Adding Images to a Website
04:38 20How to Center an Image
01:14 21Change the Font Size & Color
14:11 22Make a Clickable Link
08:45 23Stretching Background Image
05:38 24Making a Div Tag Transparent
02:36 25Simple Website Text Navigation
06:43 26CSS Compound Classes
07:02 27Class Project 02
02:05 28Class Project 02 - COMPLETE
04:48 29Add an Email Button to a Website
03:49 30Add Google Maps to Your Website
11:25 31Making a Website Live
16:50 32Uploading via SFTP
11:50 33Setting Up Our New Project
03:46 34CSS Reset
15:22 35Min-height vs. Height
07:01 36Div Tags Onto One Line
05:23 37Getting div tags onto one line using Flexbox in HTML & CSS
05:23 38Evenly Spaced Div Tags
04:42 39Two Div Tags of Different Sizes
07:13 40Vertically Center Content
07:20 41Class Project 3
02:51 42Class Project 3 - COMPLETE
05:39 43Change Default Fonts
04:19 44Installing Google Fonts
12:44 45What are PX & EM & REM
14:56 46Change Line Height
04:33 47SVG vs. JPG vs. PNG
07:04 48How to Create a SVG, JPG, or PNG
11:00 49Block Images vs. Background Images
08:32 50Finishing Up Our Cards
09:10 51Icons via Font Awesome
16:31 52Making a Div Container Clickable
09:55 53Box-sizing & Border-box
06:19 54How to Make A Colored Button
07:46 55Why Can't I Add Margin or Paddding
11:08 56Rounded Corners
04:17 57Drop Shadows
06:24 58Backup Your Website
05:00 59Reusing a Button Class
03:10 60Class Project 04
02:58 61Class Project 04 -COMPLETE
05:45 62Adding a Horizontal Rule
03:51 63Make Divs Wrap Onto Separate Lines
12:14 64Hover Color & Animating a Button
03:33 65Pseudo Classes
09:31 66Simple Dropdown Navigation
20:04 67Adding Our Dropdown to the Website
14:50 68Useful Shortcuts and Tips in VS Code
13:28 69Large Background Image
09:24 70How to Connect 2 Pages
10:42 71Simple PHP Form Work
17:49 72Placeholder Form Text
05:46 73Multi Line Form Text Box
02:18 74Form Check Marks
03:04 75Form Radio Button
06:07 76Form Drop Down Menu
05:48 77How to Style Your Form
12:55 78What does responsive website design mean
04:17 79How to change a website layout size color when at different sizes using media queries
11:28 80How to test your website on a tablet or mobile phone from Visual Studio Code
06:00 81How to change the layout of a responsive website for mobile vs desktop
16:02 82How to turn things on and off for mobile tablet & desktop responsive websites
06:03 83What is pixel density responsive images pixel ratio dp px in webdesign
14:47 84How to export responsive images for website from XD Photoshop Illustrator
05:11 85How to add responsive images to website using 100% width in HTML & CSS
06:08 86How to use srcset to change images in HTML for responsive website
10:15 87How to add a css style to the first line of a p tag on a website (
11:18 88How to make the header footer full width but the inside centered
05:36 89Class Project 05 – Header design
03:12 90Class Project 05 – Header design COMPLETE
06:25 91How to use a span tag or span class in HTML to change text
10:32 92How to pin the navigation to the top of a website fixed nav
03:17 93How to make a simple responsive mobile menu using CSS only
08:21 94What is Javascript vs Jquery in website web design
06:35 95How to make a burger menu 3 line mobile navigation for a website
15:11 96How to switch a menu nav from desktop to mobile phone
21:45 97Overview of what Bootstrap 4 is in website design
07:57 98How to install Bootstrap 4 on a website using Visual Studio Code
06:27 99Quick overview of how the Bootstrap Grid Layout works in VS Code
10:49 100Quick overview of how Bootstrap Components works in VS Code
09:23 101Quick overview of how Bootstrap CSS Styles works in VS Code
08:20 102How to customize the default Bootstrap 4 css styles
13:51 103How to use Bootstrap Layout Grid Experiment 1
10:20 104How to make 100% header & uneven widths in Bootstrap 4
07:16 105How to create uneven col widths in Bootstrap 4
07:27 106How to add padding & margins using Bootstrap 4 in VS Code
12:03 107How to change layout of Bootstrap depending on mobile or desktop
15:46 108How to turn things on & off on your website using Bootstrap 4
05:30 109Google Chrome Inspect
12:40 110Add Shadows to Text & Boxes
07:06 111Change the Default Buttons
06:16 112Responsive Images in Bootstrap 4
09:34 113How to Center Text & Div Tags
04:16 114Customize the Bootstrap Navbar
07:29 115Add Your Own Logo
03:58 116Change the Default Nav Styles
12:12 117Fix the Navigation to the Top
04:41 118Col Images & Col Background
07:56 119Bootstrap Border & Rounded Corners
04:20 120Bootstrap 4 Carousels
05:13 121Card Groups
03:29 122Drop Shadows On Bootstrap Cards
02:25 123Clickable Boxes in Bootstrap 4
04:02 124Final 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
Ratings and Reviews
Viwosoft Technologies
Great tutorial - your clear instructions and concise explanations make learning HTML5 & CSS3 a breeze!
Student Work
Related Classes
Branding