Responsive Images in Bootstrap 4
Daniel Walter Scott
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
Responsive Images in Bootstrap 4
Hello there we are. Going to work with responsive images. We've done it before earlier on so we're going to use those sweet new skills to work it with bootstrap. Okay, we're going to add this image here and we're going to get it so that it's stretchy. You see changes sizes and different media queries, watch it kinda stacks down underneath. We're gonna work through all of the different options with Bootstrap four envious code right now. Okay, so we want, we're looking at the mock up now so we've got our text and I want to actually put this image in over on this side. So there's a couple of ways of doing it and they will be will cover cover them in this video. Okay. And it really depends on the implementation. What I really want to do is this image to break down onto its own line. Okay, after it goes down to mobile you can see here, I want to kind of underneath the same sort of thing with the founder message. Okay, starts up their moves down but these little slider guys, okay, I'm just g...
oing to turn off. Okay, so there's lots of different implementations depending on what you want to do. So let's add the image to V S code, I wanted to be inside my jumbotron which finishes there, which is not quite lined up. There we go. Okay, so I want it just afterwards and I'm going to type it in here. I'm gonna say let's line it up with everything else in there. Image. Okay. Image Source. This one's going to images slash and this one is called Hero one dot PNG. Okay, because it needs a transparent background, I'm gonna make sure put my old text in their dans meet Yogurts. Yogurts, you can spell out a couple of ways. I'm destined to fail on that word, but there's my old text. Okay, so I've got an image. Let's see what it looks like by naturally by naturally and its habitat naturally. Okay, it's massive. Okay, by default and bootstrap images, try and stretch all the way out. You're like, that's not what I want. I want it small and over here there's a couple of things we can do. Let's look at the bootstrap documentation. Okay? And let's look under content. I know it's under content and images, you're gonna have to click around for a long time or do a search. Okay, so in images, all we need to do is we need to make, yeah, it kind of tells you what you need to do. So in our case if we want to make a responsive image, we need to add this tag called image or I. M G hyphen fluid. Okay, so that it kind of moves around, there's other ways we can turn into thumbnails by calling it. It's just have a look at this just because it's interesting, so we add the class I MG thumbnail to this thing so we've got you you you before the closing of the image tag, we're gonna put it in the class thumbnail. Let's have a look at her now. There you go. He's in a big white box with white background with rounded corners. Still too big but just so you know there are some strange classes but just other use cases we don't know what for this so this might be interesting. Okay I want it to be I want the class of maybe float right so I can push it over to that right hand side. Let's see how that works. So let's do that one. Let's see what happens. Okay still not working because it's too big. So what a lot of people do with bootstrap is they'll just give it a width in here. So let's say it's a width of let's say 500 pixels. Okay so it fits up the side and I'll give it a height okay of auto so that yeah the width you define and it'll just be whatever equivalent ratio is for the height and that's a way of kind of doing it. You're like okay we're getting there. Now I know in this case I wanted to be up so we're gonna have to add like negative margins and trying to pull it up this way maybe some absolute positioning. So I am going to show you a different way because you might be exactly where you need to be. You've got an image, it responds to different sizes and have a look. Get down. Okay doesn't get down small enough to fit and I haven't actually added the image responsive. Okay so let's go in there and do that. So I've floated it to the right but I also want is that I. M. G. Fluid. Okay so it actually changes size. Okay so you can see they're kind of getting bigger and smaller. Let's actually turn on the Inspector Adele device preview and now we're going to slide it in and out and you can see the image move that down a bit. Okay? It gets bigger and smaller because I've added that image responsive and that's kind of working for us, right gets to here and I just want to pop it up that way and you could chase the negative margin to pull it up maybe absolutely position it. So it kind of forgets about this and kind of moves up to the top but I know that's going to cause me problems when I want to on mobile remember break it down into its own line, okay to kind of separate it here. So what I want to do is actually just put it into two, like into a row. Like we've done lots of things right, put into a row and then have two columns that I can break on these two parts and we can just take like this one seems a little bit wider than this one. So this may be can be I don't know seven and this one could be five columns and then I can just On mobile devices make it 12 and 12. So let's give that a go. So let's have a look. And often you only get to this point where you're like actually be better in two columns after you've had a fight with float ride and negative margins and you're like give up, you're like actually, so let's get rid of height with okay that stuff we're gonna keep the image fluid and we're going to get rid of float white. So we're back to kind of just having it sitting there, no height, no width. We're gonna let the column width decide how big it is. Okay, so let's, first of all we're going to need this. Okay, so I'm going to cut it into my clipboard. Okay so I've gone to edit cut. Okay so I've got it somewhere. You can paste it, another document if you're worried about losing it. I always do or worry about it at least. And inside of here I want a row with inside of that. I want to columns please. Okay and these columns are going to have my, this first column is going to have all that stuff that I pasted. It's gonna have my H1 in my p. Tag and my a tag and all that sort of stuff except the image. He's going to go in this other column here now. One question you might have is like hey you didn't put like that internal diff we made the coal and then normally we put in, remember my box, we only added that my box. If we needed to change the column some way, we've been adding lots of color to the background and changing it a lot. We're not going to do any of that. We're just using it as a simple old container and we're doing stuff with this within it. I don't need to mess with the column. Does that make sense If I wanted to add margins to the column to the top or the bottom? Okay. I would actually put an internal Devyn here called my box and do it to that. Because remember, we don't like to mess with the coal cole knows where you live and we'll find you All right. So, it's gonna kind of work. Let's have a well, I hope it's gonna work. Let's have a little look. So, it's there. Okay. It's doing half and half. Ok. So, they're kind of 50 50. It's not quite what I need. So, I need it to be actually, I wanted to be not 50. About seven and five. We get to 12 columns, which is cool, Okay. And that's gonna kind of work. It's gonna work perfectly. Except now we want to work out the mobile. So that was great for this view when I get down to kind of, this sort of size. Okay, see this media career here, I guess is what this was, I think in your head. Okay. Which which media query is that? Is that the L. G. No, it's not. It's the S. M. So small, you know that you got it. All right. So, I want to so both this one and this one, I probably want them to be stacked on top because the image gets small, it's wrecking this and okay, it's got enough room here. It looks good. So let's attack that. So, what I want to do is instead of saying this one here is going to be my medium and above probably the thunder in the background. Very exciting here today. And not so good because I'm in a tin shed, exciting enough. Um so we are going to I'm distracted by the thunder and the realization that I'm gonna 10 big metal shed anyway, so what are we doing? Okay. We've decided that at large it's going to do it, but down here, okay. It's not doing anything. It's gonna we're gonna force it to be 12. So flustered. Okay, So we're going to say a coal 12, which assumes, okay, you mean extra small. And because I don't say small, it's going to assume it's 12 on small as well. And then finally, when it gets to the medium, it's going to say actually I'm going to override you. I'm going to go to five. So mobile first you got it have a look. I know it does it by default, but sometimes it's only because the content forces it to you're not really doing it. Okay. So it looks good. It's all stacked on top of each other and then boom and it gets to there kind of moves this, that's why I went for the two column approach because it makes this nice and easy. There's a few other things I want to do. Maybe lower the font size. Okay. When I get down to this one because it's kind of breaking in weird places and we need to play with padding and we need to center it because my kind of mock up here has the text centered on mobile. So we'll do that in the next video. That's of course if I'm here in the next video and not struck by lightning.
Class Materials
Ratings and Reviews
Viwosoft Technologies
Great tutorial - your clear instructions and concise explanations make learning HTML5 & CSS3 a breeze!