text
stringlengths 1
81
| start
float64 0
10.1k
| duration
float64 0
24.9
|
---|---|---|
So as I shrink the screen, the
third column shrinks with it. | 5,874.33 | 3.15 |
As I grow the screen, it also
grows alongside with how big | 5,877.48 | 4.62 |
this window happens to be. | 5,882.1 | 3.13 |
And so flexbox and grid are
some very powerful tools | 5,885.23 | 2.79 |
that we can use and
just to make it easier | 5,888.02 | 2.07 |
for us to be able to use
mobile responsive design, | 5,890.09 | 3.21 |
to be able to make sure
that our pages look good | 5,893.3 | 2.46 |
no matter what kind of
browser or what kind of device | 5,895.76 | 3.27 |
the user is using in
order to look at our page. | 5,899.03 | 2.73 |
But it turns out that
exists a lot of libraries | 5,901.76 | 2.43 |
out there that do a lot of this for us,
some people that have already written | 5,904.19 | 3.42 |
CSS code to make our text look
good, to make our buttons look good, | 5,907.61 | 3.48 |
in order to make sure that
things are mobile responsive. | 5,911.09 | 2.34 |
And one of those is called Bootstrap. | 5,913.43 | 2.46 |
Bootstrap was a very
popular CSS library that we | 5,915.89 | 2.34 |
can use in order to use
some styling that they | 5,918.23 | 3.12 |
have written, such that we don't need
to write all the styling from scratch. | 5,921.35 | 3.96 |
So this is what Bootstrap's
website looks like. | 5,925.31 | 1.96 |
I'll go ahead and show
it to you now just | 5,927.27 | 1.7 |
to give you a sampling for
what's available inside | 5,928.97 | 2.13 |
of a library like Bootstrap. | 5,931.1 | 2.43 |
If I go to getbootstrap.com,
here's Bootstrap's website. | 5,933.53 | 5.54 |
And if I go to their documentation
on this first link here, | 5,939.07 | 3.4 |
I can look at all of the Bootstrap
components that I'm given access to. | 5,942.47 | 3.62 |
These are things like
alerts, for example. | 5,946.09 | 2.43 |
That here's an alert that's
styled in a very particular way. | 5,948.52 | 2.64 |
It's in a specific font. | 5,951.16 | 1.17 |
It's got a certain amount of
padding and certain colors. | 5,952.33 | 2.61 |
And if I want to just copy this alert,
once I've used Bootstrap's code, | 5,954.94 | 4.05 |
I can just apply
certain classes to a div | 5,958.99 | 3.54 |
and Bootstrap will handle the process
of applying the right styles for me. | 5,962.53 | 3.36 |
I don't need to write all of these
styles by myself from scratch. | 5,965.89 | 3.17 |
Bootstrap's written a lot
of the styling already. | 5,969.06 | 3.67 |
So how do you actually
go about using Bootstrap? | 5,972.73 | 2.42 |
Well, to get started
with Bootstrap, all you | 5,975.15 | 1.84 |
need to do is copy the CSS
link that Bootstrap gives you | 5,976.99 | 3.72 |
to the top of your file. | 5,980.71 | 1.63 |
So if I take the CSS link and then
go back to something like hello.html, | 5,982.34 | 4.73 |
which you'll recall originally looked
something like this, just Hello World, | 5,987.07 | 5.16 |
I can add some Bootstrap
to it to say, all | 5,992.23 | 2.58 |
right, I would like
to take this HTML file | 5,994.81 | 4.41 |
and apply Bootstrap styling to it
to make it look a little bit nicer. | 5,999.22 | 4.06 |
So I refreshed the page. | 6,003.28 | 1.16 |
And now, you'll notice Bootstrap's
chosen a custom font for me | 6,004.44 | 2.82 |
just to make things look a little
nicer in Bootstrap's own eyes. | 6,007.26 | 3.64 |
And now, if I want to
add Bootstrap elements, | 6,010.9 | 2.39 |
I can say, all right, let
me go to their components. | 6,013.29 | 3.28 |
And I want to add an alert. | 6,016.57 | 1.31 |
I can just copy their alert code. | 6,017.88 | 2.33 |
Here's their alert code for a primary
alert, an alert that looks blue. | 6,020.21 | 4.45 |
And I can just inside the body of
my page go ahead and add an alert, | 6,024.66 | 4.85 |
and maybe change the text to
here is my alert, for example. | 6,029.51 | 5.65 |
Now, when I reload hello.html, I
now see an alert that shows up, | 6,035.16 | 4.5 |
styled according to Bootstrap styling. | 6,039.66 | 2.82 |
And again, I can change that styling
just by changing these classes. | 6,042.48 | 4.54 |
So a primary alert shows up as blue. | 6,047.02 | 2 |
A success alert shows up as green. | 6,049.02 | 1.62 |
A danger alert is red. | 6,050.64 | 1.42 |
So if I want to give a danger alert--
the user is doing something wrong | 6,052.06 | 2.96 |
on the web page, for example-- | 6,055.02 | 1.56 |
I can change alert primary here inside
my HTML to something like alert danger | 6,056.58 | 5.22 |
instead. | 6,061.8 | 1.08 |
And now when I refresh this
page, I now see the alert | 6,062.88 | 2.73 |
shows up as red instead of blue. | 6,065.61 | 2.91 |
So Bootstrap gives us access to a
lot of these various different types | 6,068.52 | 3.48 |
of components, different ways of adding
breadcrumbs and alerts and carousels | 6,072 | 4.29 |
and other elements to our page just to
make it easy to make our page look good | 6,076.29 | 3.78 |
very, very quickly without having
to worry too much about writing | 6,080.07 | 2.88 |
our own CSS, because Bootstrap's
written a lot of that for us. | 6,082.95 | 3.8 |
Bootstrap even includes
a way to make sure | 6,086.75 | 2.44 |
that web pages are mobile
responsive using something | 6,089.19 | 2.61 |
called Bootstrap's column model. | 6,091.8 | 2.94 |
So I'll show you an example of that now. | 6,094.74 | 1.84 |
Bootstrap divides its page
into 12 distinct columns. | 6,096.58 | 5.07 |
So one thing I can do
is I've pulled this up | 6,101.65 | 2.09 |
in an example I have in advanced
called column zero.html. | 6,103.74 | 3.87 |
Notice that inside of
the body of my page now, | 6,107.61 | 2.73 |
I have a div whose class is container
and then a div whose class is row. | 6,110.34 | 5.13 |
And Bootstrap divides every
row into a 12-unit column. | 6,115.47 | 4.84 |
So here, for example,
I have a whole bunch | 6,120.31 | 1.79 |
of divs that are each 3-unit columns. | 6,122.1 | 3.06 |
So if I have four 3-unit
columns, that will take up | 6,125.16 | 3.09 |
a total amount of space
equal to 12, meaning | 6,128.25 | 2.88 |
filling up the entirety of the screen. | 6,131.13 | 2.83 |
So if I now open up source column
zero.html, here's what that looks like. | 6,133.96 | 6.14 |
I have four columns, each
of which is of width 3. | 6,140.1 | 3.6 |
And as a result, as I
shrink it, those columns | 6,143.7 | 2.76 |
will automatically resize to
make sure that they're always | 6,146.46 | 2.79 |
the appropriate size. | 6,149.25 | 1.5 |
Now, as long as they add up to 12,
they don't only to be the same size. | 6,150.75 | 4.09 |
So, for example, if I only wanted
three columns, instead of four, | 6,154.84 | 3.8 |
I could get rid of the fourth
column by deleting those rows. | 6,158.64 | 3.73 |
And maybe change the second column
instead of being a column of size 3, | 6,162.37 | 4.34 |
let's make it a column of size 6. | 6,166.71 | 1.83 |
So that's a length 6 column instead. | 6,168.54 | 3.03 |
And now if I refresh
the page, now suddenly I | 6,171.57 | 2.61 |
see three columns where
the middle one is twice | 6,174.18 | 3.03 |
as large as the ones on either end. | 6,177.21 | 2.13 |
And as I shrink this down, I can
see that it shrinks down as well. | 6,179.34 | 4.91 |
And one of the advantages
of using Bootstrap columns | 6,184.25 | 2.57 |
Subsets and Splits