Skip to main content

Pseudo Classes

Lesson 65 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 2200+ more >

Lesson Info

65. Pseudo Classes

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

Multi Line Form Text Box

02:18
74

Form Check Marks

03:04
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

10:15
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

Pseudo Classes

Hi there, we're going to take pseudo classes to our next level. Okay. We're going to target this second p tag in our testimonials and we're gonna make it smaller. We're going to tap it in and you will notice in our html We haven't applied a class to it because that's what we would have done up until now. Right. We would have gone all right. Peter to go to class. But look, they're just plain old p tags. But somehow in our CSS magically were being able to isolate this using a pseudo class. We do it with our testimonial, we do it with this good looking thing. Every third list item is red pseudo classes. They are the place to be. It's where it's happening, join me in this video and you too can be cool with pseudo classes. Alright, so we learned the real basic pseudo class hover in the last video, but there's lots of other cool things you can do with pseudo classes and the w three schools version of explaining it all can be very dry okay. And and that sometimes is really what I want, but so...

metimes it's good to go and check out something like CSS tricks. Chris square is really good at just giving things a practical application and sometimes it'll say you have to do something according to the manual, but then you're like really and then you come in here and sometimes because it's like, yeah, that's what you meant to do, but it's not what people do. Not only not a regular designers do or developers anyway, this one's pretty good CSS tricks dot com slash pseudo class selectors. Just do a search on his site and it gives you more practical explanations. Now, I'm going to go through them myself because there's lots of this. Okay, but just know that there's more that we can cover in this particular video, It's got a really common one. So we've done those ones. Let's look at these ones. Okay, The position and numbering are really useful because what I'd like to do for our testimonials is this last thing here, this last tag, I would like to make it smaller. Indented a little bit. Where's my mock up? Okay, I want it. Well, that's not, I didn't even do that in my mock up, but I want this smaller push to the right and maybe a tele sized so we can target things like that using pseudo selectors. So let's have a little look. So we're gonna use this one called our first child first and then we'll look at last of type maybe. Okay, so let's jump into our visual studio code. Alright, so start working with the slightly more complicated pseudo classes. Let's look at the first child one because what I'd like to do is I'd like to say style the H one. Okay, Inside of this here box, so what we can do is we can say, okay, inside here a box. Okay. Here, Box one, I'd like to do the um, you know, I'd like to style the first child. Okay. Remember we talked about parents and Children kind of makes a little bit more sense now. Right, Okay. So I want to find the first child and now what you do with it is up here. Can you see? Let's look at an earlier one. So we want to find a P tag inside of cards. We put a space and it's the same with these pseudo classes. I don't want to attach it straight to this. Okay. And do first child. Okay because that's not what I want. What I want to do is find the first child inside of, So just having that space in here. Like we've done earlier for earlier kind of compound classes. I want to find the first child inside a hero box. I'd like to make the color of click. It's weird. Huh? Weird syntax. Don't worry. I find it weird too cool. So I found the first child inside of there. You could say the last child. Okay. It's going to look at here a box and find the last thing in there. And the last thing in there is this button here and it's applied the blue color to the text. So it's going to work for us. Okay. What we want to do is not here a box. We want to find our cards. There we are. And we're going to say I would like inside of tea box T box. I would like to find the last child Because it's the last thing in their last child. That's what I want. Is that what I want? Some better syntax, less curly braces. And let's do font size just make sure it works. So font size, I'm going to turn down to maybe .8 ems rims. Okay, lets save it. Let's have a little look. Did they work? There you go. So I've said the last trial of this um this box here to do this to it. Okay. What I could do as well is if there's more hours is quite simple boxes you can do, let's comment that out. So it's there and we look at a slightly different way because your box that your your div tag might be more complicated than that. So there's other ones in here. Let's have a little look, we'll do length of type A or type, This is a good one. So child is just dealing with whoever is inside the parent and of type. Okay, let's say we want to find the last of type. Okay, and what kind of type? So we're going to say inside of the tee box space because I wanted to be inside tee box, I want you to find the last and not last child will find the last of type. Okay, and what kind of type? I wanted to be the attack, These two get joined. So the last kind of p tag inside of tea box is going to Do the same sort of thing. I'm gonna do font size, font size of 0.8 it means and we'll do a bit of padding on the what side is that? That side is left left, just gonna push it over a little bit. How far I'm going to guess that for the moment. Let's have a little look and old guy is there? Okay, so it is the last of the P type. Okay, we end up at the same place, but you can imagine if you have lots of things afterwards. Okay, after this P tag, maybe there's an image. Okay, our last of the last child is not going to work okay, because that's the last child now, so you can be a little bit more specific with it. Okay. Now again, I'm not going to cover them all because they will have a, I guess their own kind of place. Let's look at maybe just a few more. But what we might do is we might leave that because that's working and I'll leave that there. You can decide which one you want to use. And I'm just going to close this down and create a new document. Alright, what did I do there? I just created like a throwaway document. Right? So there's a new ordered list, which is a bullet pointed list and there's little items inside of it and it looks like this. Okay, so you can play along, you can create this if you want and I'm going to do my styling up in the head tag for the moment. Alright so let's look at some other things. So Let's say that I want to target the 3rd guy down. Just this fella. So what I can do is I can say inside of the U. L. Okay put a space because something inside of it. I would like to target the 10th child. Okay and in the brackets, you type the number you want? So I want to target the third child inside of this fella. Okay, I'm going to put in my curly braces, I'm going to say make you a color of red. We've used too much blue. Okay, so let's give it a test in the browser. There you go. The good thing about it is if I start putting stuff in here air polls I'll speed this up. Alright, that'll do let's save it. Let's have a look. So the oranges red gay. But the thing about it is if I move the order of this will make the orange is the top. Okay, it doesn't really matter actually, you can see banana has now become red. Okay, so it's a great way of targeting it and you can kind of dump stuff onto the page and it doesn't matter. The third person will become red and you can also do instead of just the third child, you can actually say I want the second letter, the letter in afterwards. Okay. It'll be the second version of him and just kind of repeat. Okay. Same. You could put in third, there's lots of other things you can do okay. Um in terms of kind of trying to find specific, you know, you might be dumping loads of data onto a page and you need a style, you know, every 20th row, but only if. Okay. And that's where you might jump into something like chris coy is kind of a bit more. They all kind of dive into nice little examples but I think that's it gives you a good explanation. Okay. The big thing to know though, is that different from our hover class? Often there's a space in between because I want to find the child inside of this thing, but if you want to get real specific, if I want to find the ally, okay, I want to find the nth child only targeting the allies inside of the U. L. This gets joined up. Weird but true. Alright. Do we actually do our uh we did we did we tagged those in, That's what I really wanted to do and that's why we created our testimonials so we could learn a bit more about pseudo classes and if you're like, man that seems like a big what are we doing this for? Because later on in the course we're going to need to know a little bit more about pseudo classes. So it's good kind of foundation for us. It'll make it real easy later on. All right, that is it for this video? I will see it in the next one.

Class Materials

Bonus Materials with Purchase

Exercise Files
Completed Files

Ratings and Reviews

Viwosoft Technologies
 

Great tutorial - your clear instructions and concise explanations make learning HTML5 & CSS3 a breeze!

Student Work

RELATED ARTICLES

RELATED ARTICLES