Skip to main content

How to customize the default Bootstrap 4 css styles

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

Daniel Walter Scott

How to customize the default Bootstrap 4 css styles

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

102. How to customize the default Bootstrap 4 css styles

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

How to customize the default Bootstrap 4 css styles

Good morning, everyone today we are going to look at how to override. Bootstrap styles. It looks very boot strappy to start with. We're going to customize it a bit to change it to look like this. There we go. A lot less bootstrap. E. Okay. And we're going to do a couple of things. We are going to show you how to completely override the styles, but also how to just work within the styles that bootstrap have created. Often there are styles that have been applied that we want to change and bootstraps pretty helpful and have actually created alternatives for them. So we do a mixture of overriding and just finding alternatives. Well, in this morning's video where I have the crankiest voice that I can't get rid of because it's real early. See in the video, All right, to override our styles. We're going to close down our kind of like throwaway html. We're using we're going to open up our index page by double clicking it. Cool. So let's have a little look at the CSS so you can actually click o...

n this link here. Okay, if you hover above it on my Mac it's command and click I'm sure on a pc it's control And click OK. And then click it, open it up and that my friends is the CSS bootstrap gives us Holy smoke. It's a mini ified version which looks more complicated than it is just Okay, but it's all in there. It's just cut down to the smallest possible size. Okay, so if I go find so I'm just using my find find. Okay, let's look for our H one and you can see there's five occurrences 12345. And this first one is kind of more of a zeroing code by the looks of it. Lots of stuff gets its margin set, I don't know just a little bit. So the margin top zero margin bottom gets override ID. Okay, over here for one The H one size. Okay, get set to 2.5. So there's some stuff going on that I can figure out and then start to override now. What you don't want to do is actually start adjusting this file because you can download bootstrap dot min dot CSS and actually start editing it. Get Bootstrap actually has a non modified version that you can start adjusting, but it's best to just leave Bootstrap do its own thing and override it, it gets way too complicated to start adjusting the specific file. So what we do is in visual studio code is you create your own CSS sheet. So let's create it first over here. Right click new file, let's call it styles. Just call it style dot CSS Okay? And in my I'm gonna drag it over here. Okay, and in html I'm going to underneath my bootstrap. CSS I'm going to add my own link. Okay, so link CSS and it's happen lee called it. Starlet says this not by default, just by luck. Alright, so the thing is the big thing is it needs to be underneath Bootstrap okay for it to work properly. Let's go and change something. So at the moment let's have a look. I'll start our browser. Okay? It is set to a specific font. Let's go and change the body copy font. Okay, so in here we can say buddy, we're going to pick a font style at the moment. I'm just going to pick one of the no not font style font family. Okay. And we're going to pick one of the defaults. Okay. And this one is going to be something strange, will use impact Kane, and I'm going to preview in the browser and you'll see everything has gone and changed. So we're going to leave their CSS all the way alone and just work on the top of it. Well, we're gonna have to do is sometimes figure out what bootstrap has called things to override it properly and I'll show you how to do that a little bit later on, let me show you what will happen and what you have to fight with if you get this below your style dot CSS you see back to the way it was, you're like, hey, but I said b body B impact or that word. Okay, so just got to make sure that that's around that way. So that's overriding a style very often though, you won't actually have to override a style you'll just find another appropriate bootstrap style because they're giving you loads, So what you end up doing is let's say let's look at this fella. Okay, Is I'm just going to get it here and that sliding thing down the bottom is annoying me, but let's say that's the H one. Okay, this thing here, let's figure out what that is, first of all. Okay, so there's a little trick you can do in chrome, you can right click it okay and go to inspect and whatever thing you had kind of highlighted, it'll show you in the html, what it actually is and you can see there's a P class with AARP with a class of lead on it. Okay? So let's go and have a look at our html. Okay. And where is it? So navigation underneath navigation, jumbotron, So P class would lead on it. You're like actually I just wanted to be a regular PE class. So instead of trying to style the lead class and you want to make it look like this. Okay, Just the regular old P tag and just go and remove this or find out what it does and see if there's an alternative that you like. So grab it, copy it and let's have a look at the get bootstrap site. Okay, documentation. And let's see if we can search for their lead. Oh, a little bit faster. It is there? So it is on their typography, so it's under content typography and there's a bunch of different options in terms of styling. So these are the H ones by default. Okay. Um, this is weirdly api class with a style of H one applied so you don't actually have to have it the heading one to be a nice big bit of type Other things. Oh, there is. There's a class here of a muted text you can see here, it's made it all kind of faded out. This is where you start kind of exploring bootstrap and finding things you like a display option. So H with a display of one gets huge. Okay, I lied. Okay. Makes a pair of standing out by lead. You can adjust that. You can go now and style this class because you want all the leads and all the pages to be slightly different bits italicized or something or you can go through and actually just say I want to remove it. Let's go. And in our case just remove the class. Everything except for the square brackets now. It should just be a regular old Bit of text like the top one. Or we can say let's use one of the other ones we found. Mm hmm. What have we found? Let's use display one. I'm not sure if you what happens when you put display one on an H on a P. Tag. Let's go. It's exciting. Let's do it. And here my P tag is gonna have a class class of Not lead. What was it called? Display high from one I think display hyphen one ticket check in the browser. Whoa. It's a big first paragraph and man that font that we picked. Don't worry, we're not sticking with that font. It was just a for instance impact. There's going to be a bit of time at the beginning where you're like, oh man, how much time do I want to spend going and learning this stuff versus just overriding it. There's nothing wrong with overriding and just saying I'm going to add my own class and do it. But it is handy to start understanding what these things do, figuring out if some of the hard work is being done for you. But in our case like lead isn't super exciting. You can just override it or make your own one but have a look through the rest of this topography one. You can see there's lots of cool stuff here. Bold Italicize, you can see all the shortcuts for it all. You can see there's a highlight one. Okay. You can add that as a like a little span tag wraps around the outside. Okay. And it will highlight it fancy. Okay, we're not gonna go through them all. What I really wanted to point out was that sometimes you override it by actually just going and doing it over the top and then sometimes you actually just figure out what the class that currently is applied and then go and change it. There's lots of stuff that we're going to cover later on in the course that are just like this is kind of a weird cool one. I really like it. This is adding a margin of four. Okay, four rims, Katie D Y axis. So up and down. So there's a horizontal ruler. Okay, Which is this fella here? Okay. Where's my ruler? Where did the water go? There? It is there, see this line? Okay. This line running through the center there, you have to zoom in editor because it's pretty small and thin but there is padding off four rings top and bottom, not left and right. Okay, top and bottom because it uses the Y axis. So there's some kind of like naming conventions that we're going to get used to as we go along. So for the rest of this video, I'm just going to do stuff we've done before just to tidy this thing up. First of all, I'm going to get rid of my display class and add back my lead. I'm going to bring in some fonts. Okay, we've done this before, but if you want to practice follow along with me. So google dot com slash fonts. Okay. New endeavored fonts dot google dot com. Okay. And I'm looking for two fonts for this particular um website. So the ones I want is this one here called a real fat face and the rest of the text is going to be open sans light. Probably open sans light plus with a bit of open sans bold. I think that's the only two that I used. Alright, so let's do this. Let's do april that face and add him. And I'm going to do open sands. Open sands. Cool. Let's have a look down here and let's say open sands, let's customize it. I want, I don't think I used regular, I just use that and bold. Okay, and when I get to april fat face I get a lot of that's open sans and underneath it is april okay, and just there's only one size for that font. So it was just the regular. And what we're gonna do is we're going to embed it, we're going to grab this at the top, copy it, make sure it goes above our CSS sheet. Okay, hindi remember does it go above bootstrap or below bootstrap? It works either way, let's save it. And what else we need, we need to actually apply that to our styles. So let's grab both of these because we will use both of them. It's over here. I want my I'm just gonna dump them in here willy nilly, I want all of my font family to be a default of open sense and I'll make it a default of I need to change it to white but probably a little later on. Once I start coloring my site. How does it look at the moment if I do wait too early I'm not going to be able to see all this text. Yeah, we'll change it a little bit later on But I wanted to be a font weight of the light. Okay that I was using and over here it's described as 300. That's the light for that one. Cool. The font that I want to do, I want to do an H1. Okay. And that's what I want to use my april for actually had to leave the wrong one. Go back then. Remember fonso just says I want you to be april if you can't find it, go and find the default cursive font. Okay. It's the one that's going to be the fanciest one on your machine. This one says open sands if you can't find it. Whatever the default sans serif is, which is probably going to be a real or helvetica but it should load because we've told it up here load from google and google is pretty consistent so we've overriding some bits, let's have a little look there's a document there. It is there Okay so everything that's not our age one is now open sans light and our heading here is april Alright, one last thing I want to do is add a background gradient. Okay we're going to jump in here and I'm going to say you pause it now and reckon and see if you can do it. Okay. Remember our background gradient. Okay. It's going to be. I've got the colors in your or are they your exercise files? Okay. N project for Okay. There's a document in there called Project for text. Open that up. And those are the two colors I want you to go for. Okay. See if you can do it without checking and just see how you go if you can remember it. So go on, pause it now. All right. How'd it go? You remember where to put it went on the body? Okay. And you remember what it was Cool because it's a weird one, right? It's background hyphen image then you decide where it's going. We're gonna use linear gradient. And inside these brackets here we decide the direction. I love this. Normally nothing makes its abbreviated short stuff, but um to bottom right. K means is going to go from top left to bottom, right comma. And then we're going to put it in our two. Tell us about these two can't use the hyphen. I've just added that in there. I should take it out of the text. Actually confusing and just a comma between them. So I don't need that little hyphen there. Well those are the two colors. It's gonna make sure I close it off. I can't see the side, we're here right on the edge there now. That one's doing it by default. Why isn't rapping on this side. I sure it turned it on. It's just at the edge of where it should wrap. There we go. Turn it back on. Alright, let's save it. Let's have a little look and there we go. Look at that. Beautiful. Alright, so we've customized our style sheet a little bit overriding things and also you're going to spend a lot more time probably figuring out what these classes. What does this BG light and what does it do? And can I is there a B. G. Duck? I bet you there is. Okay. And kind of having a look at the documentation and either finding something that already exists or at least close to what you want and then doing a slight adjustment over the top that my friends is bootstrapped life. Alright, onto 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