Skip to main content

Make Divs Wrap Onto Separate Lines

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

Daniel Walter Scott

Make Divs Wrap Onto Separate Lines

Lesson 63 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

63. Make Divs Wrap Onto Separate Lines

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

Make Divs Wrap Onto Separate Lines

Hey everyone this video, you'll notice that we have all these testimonials here, They're here because I want to show you how flex wrap works. Okay, so we've got these guys all in one parent tag okay? They're not an individual rows. Okay? They're all in their own one tag and there's a cool little feature called text wrap or at least flicks rep that will break them onto their own lines. Yeah, so let's learn how to do that and add some testimonials. Alright, in my mock up of mocked up, three different sorry, four different testimonials here. And what I'd like to do is I like this site to kind of just grow as I keep adding testimonials to get longer and longer. So instead of making a row, okay, So I could make a div tag like a parent and put these two in it and split them using flex box, okay? Or and then do a second one. Trouble with that though is that I have to make a parent for every single one. And what I want to do is I want to show you the flex box attribute called text wrap. It mea...

ns we're going to make one giant or one parent for them all to go inside of and what we're going to say is guys just wrap on the next line is that if there's too many of you and you don't fit, go to the next line because by default what it tries to do, like these fellas here just tries to squeeze them all on the same line now, it's going to take us a little while to build this up. So if you just want to cut to the shortcut sheet in your exercise files, under flex box, this is the attribute here. So you can kind of see what it's doing there. It's going to to the parent tag. Just add that rap condition. Alright, But I want you to, if you're working along with me, okay, I want you to let's go through the rest of this tutorial because I want to have a few bits and pieces because there's some things later on in this course, if you're thinking I'll just skip this one, it's gonna come back around because I want to do certain classes and all sorts of other fun stuff later on. Cool, so where to add them? It gets confusing down here, Right? And you're like, where is all this? And I find just clicking in them, you can see it's kind of married up his buddy up the top there. Okay, so cards end there after cards finish, I want my testimonials to start. I'm going to put a nice big break in it to make it easier for everyone, mainly for me. Okay, so I'm gonna create a class cord test ceremonials close enough for me. Okay, and inside of there, I'm going to make how many? We need three of them. So I'm gonna create all the classes now, there's one going to, I'm going to call it test box T box. Okay. And unlike our cards where we've got card 12 and three because these are exactly the same. Okay, All the way along, I'm just gonna use the same class to control them all. Cool. Inside of these tee boxes are going to be some texts that I've got in your project to folder. Okay, look for a project to text and I've got my testimonials, I'll show you this testimonial generator dot com. I do not use this by myself. Okay. But I was looking for something for this class and I just needed to go through. Okay. And I found testimonial generator dot com. You put in your projects servis dans back massager? Nobody wants one of those. Okay. Ah and there you go, generate since I've invested in Daniel's Back massage, I've made over, Wow, profit. Okay. Of I'd be lost without that, you get the idea right, You can generate all of these things. I did, I did for these ones, but I don't for my own particular ones. Okay, So I put in raw cycles and what I'd like to do is I'd like them, I'd like this, so the name separated from the body copy into two separate p tags. I'm gonna copy this first bit. Okay. And I'm going to go into here and I'm gonna put in the P tag and I'm going to paste that in. Okay. And I'm going to tidy it up, that's the kind of guy I am. Here we go. Okay. And we'll do another P tag with, I could just make up the name. Right, okay, another P tag and I'm gonna put this one in there. All right, So I want that for three of them. So I'm just gonna duplicate them copy paste paste. They're all getting my tabs all getting messed up. Do you remember what we did earlier? I'm gonna select where is all of this. I'm gonna right click it and I'm going to go to format selection. You see the shortcut there if you're finding, you know, you want to do it all the time and now it's nice and spaced. Okay. It's gonna switch out the text. I'll get the editor to speed it up Now. The editors, Jason. Thanks Jason. And for some reason, and we decided we needed three. Clearly we needed four. Okay, uh there we go, paste them in and within us one in and I'll see you in a second. All right, you're back. What you might have noticed is when I did my cleanup, cleaning up my code. Did some weird stuff by putting this in there. I'm not sure why. Maybe it's the apostrophe. I'm not sure. I didn't really clean it up. I got my tabs, right, but did some weird stuff with the P tag. Remember if yours is flowing off the page. Get a view and toggle the word, wrap. Okay, if it's going all the way off there might be how you like it. I'm I don't alright so I've got my four things in. Let's have a look at it in my page. Is that the one, is that the one there? It is there? Okay, so I've got these four testimonials. I haven't styled them at all. So let's go and do that. So let's go. I'll style the tee box first. Okay because they're the ones that have like the width and height so dot T box, I'm going to do a couple of things to it. I want to give it a width. Okay In this case I'm going to use percentages and I'm going to do, I already tested this. Okay. Um I'm going to make it 37% to have a little look. Okay and remember actually that's a little small. Yeah, good work down testing it. So that's that they're perfect and I would like to Put some padding around it. Okay so padding all the way around. I'll do 50 pixels and I want to get them up on the same line. Actually put the line around the outside first just so that we can get that done. So we do border, I'll spell it wrong for like the millionth time border and we are going to do the same as we did for the buttons it's going to have a width of one. It's going to be a solid border, it's going to be white, let's have a little look and how close is that? That's pretty good. Okay now I want to get them up on their own line. It's never going to happen at the moment because we've got ours a little bit big. You can kind of see I made it be 47%. Okay but it's way past that, it's way past 50. Why is that? You know why? Because we added the padding. Remember the padding added to the total width? And you're like okay so I could that's why I had 37 in my head because 37 plus my padding it makes it less than half or is it less than half. And that was just being sneaky trick and but we don't want to do that. We want to be all official. Do you remember how to do it? Okay we do it to the box or the wrapper box. I think we can do it too. I'm not even sure my mind's gone blank. Let's check it at our testimonials. Testimonials. Okay and let's remember. It was remember. Border box border border box. No it's box size box sizing. Border box. There you go. No you have to actually do it to the things themselves. Of course you do. That makes sense. There you go. Okay, so by doing that. That minuses off that and we're good to go. All right. Next thing we want to do is get them up on the same line. Okay how do we do that? I want you to pause it and just have a little think it's not an exam. It's kind of like a pop quiz. All right. What we did before. Okay, is remember we set the display to flex. Okay. And by default they'll all try and squeeze on the same line, which is cool. The next thing we're gonna look at is the bit we have, Well, we didn't have mentioned. I totally pointed at it. Okay from your flex box, um cheat sheet. Okay from the exercise files and we set the flex wrap to rap because that's what we want to do. Okay, let's have a look. Let's go to here. Let's set the flicks rep to wrap. Here we go. See if it works. Nice, awesome. Huh? Now I want to separate them up. I could start adding padding between them. I could do to be a little bit hard. Okay, do you remember what the class we add from flex box just to separate them all out. We did it for this one. You can cheat and go and check that one. Okay, where is my cards cards? There it is up here. Okay. Remember this one justify content space between All right cards, you know like he was just stalling because he couldn't remember a little bit, but that's what it is justified content space between. Okay. And it should separate them all out. Now I want to add a little bit of margin to the top. Okay, so of these little tee boxes here, I'm going to say imagine martin margin, we'll do top And how much we will do. 50 pixels. Here we go. There's a little borders. Okay. We've got this weird thing going on with the height here. Okay. With our gradient going random in the background. Let's fix that. And what's controlling him the top here. So we added this before to fix the problem with our website was too small. Okay, and it's made that initial view. Okay, 100%. Which kind of gets us down to the bottom of my screen now, yours might not have this problem because your screen might be smaller or bigger. Okay, but we don't need the height to be 100% anymore. There you go there because my website is nice and long. I do need some padding underneath of these guys are actually, where do you add the padding now? Okay, we don't have a footer in this site. Weirdly, I just didn't design one with one, so I don't have to have one. So where should I do it? Mm Well, I might put it at the bottom of the testimonials. I'm reluctant to add padding to the bottom of the body only because I'm gun shy. Like, um, messing with the body tag can do weird stuff, especially if you're working with things like Bootstrap flex box. They all, they all got their mitts in for wanting to do stuff with body Gabe. I'm going to just be super careful and just use the one that I made. I know that they're not going to mess with it. Okay. And I'm going to say margin bottom And I'm going to say 50, maybe hundreds. Double it up. Let's have a look. That's my mock up. Mm hmm. There we go. Some padding at the bottom or at least margin at the bottom. Alright. So we learned what flex wrap does. So it means that these guys are all four guys all in one box. And the cool thing about it is that if I made these guys smaller or I added more of them. Okay, so let's go copy. I'm going to add a few more paste paste paste. Making loads more. And the cool thing about them is check it out. They can just keep wrapping onto the next line. All right. I just, I don't want all those guys go away. Nice and clean back to where we started. Except you you over there like the mic and we're done. All right. I will see you in the next video

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