Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,740 --> 00:00:07,700
Now even in it's current state our Web site already compares pretty favorably with our computer science
2
00:00:07,700 --> 00:00:09,210
professors Web sites.
3
00:00:09,350 --> 00:00:11,620
So we're definitely doing something right here.
4
00:00:11,720 --> 00:00:18,350
But we can make it even better if you take a look at the personal Web site of Sean Halpin who's a web
5
00:00:18,350 --> 00:00:25,220
designer at Sean help and I know this is one of the most beautiful personal web sites I've ever come
6
00:00:25,220 --> 00:00:25,850
across.
7
00:00:25,850 --> 00:00:31,590
It's incredibly simple but it's also really beautiful and really well-designed.
8
00:00:31,670 --> 00:00:39,440
So this is going to be our inspiration for this CSSA module and I'm going to show you how by using the
9
00:00:39,440 --> 00:00:45,020
powers of the SS and everything that you're going to learn in this module we're going to elevate the
10
00:00:45,020 --> 00:00:52,800
design of our personal site to look something like this and bring it right into the 21st century.
11
00:00:52,850 --> 00:01:00,140
So the first thing that would already make our Web site look a little bit nicer is changing this pretty
12
00:01:00,140 --> 00:01:04,880
bland white background to a colored background.
13
00:01:04,880 --> 00:01:12,830
So if you had Evis your code file and open up index or hemol we can inject a little bit of SS right
14
00:01:12,860 --> 00:01:20,990
into the h l tag that we want to effect and the tag that we're interested in is the body tag because
15
00:01:20,990 --> 00:01:29,430
we know that most if not all of our displayed content on our website is enclosed inside this body tag.
16
00:01:29,660 --> 00:01:35,770
So if we change its background then the entire Web site's background will change too.
17
00:01:35,960 --> 00:01:46,520
So inside this body tag we're going to tap into an attribute called style and style takes CSSA code
18
00:01:46,730 --> 00:01:48,600
inside the quotation marks.
19
00:01:48,710 --> 00:01:53,330
So the style that we want to change is the background color.
20
00:01:53,420 --> 00:02:00,500
So I'm going to write background Dasch color and I'm going to write a colon and after that colon I'm
21
00:02:00,500 --> 00:02:04,710
going to specify the color that I want for the body.
22
00:02:05,120 --> 00:02:11,750
And let's just start off with a blue color and then we're going to close off this line of siestas code
23
00:02:12,050 --> 00:02:13,920
using a semi-colon.
24
00:02:14,270 --> 00:02:22,750
And now if I hit save and if I go back to my browser and remember that we're working with the.
25
00:02:23,000 --> 00:02:28,670
And remember that we're working with the local file not the one that you might have hosted on get hub
26
00:02:28,880 --> 00:02:31,280
but this is where our development is going to happen.
27
00:02:31,280 --> 00:02:37,730
So if you don't have it up remember you can simply right click and go to copy full path and paste it
28
00:02:37,730 --> 00:02:38,210
in here.
29
00:02:38,210 --> 00:02:41,740
In order to get to that Web site under-development.
30
00:02:41,810 --> 00:02:49,250
So once you are here then if you hit refresh you'll see our CSSA code being implemented changing the
31
00:02:49,250 --> 00:02:52,550
entire background of our Web page.
32
00:02:52,550 --> 00:02:57,910
Now the question you might have at this stage beside the question of how did we manage to get our Web
33
00:02:57,910 --> 00:03:00,640
site looking even uglier than before.
34
00:03:00,650 --> 00:03:02,280
Just bear with me on that.
35
00:03:02,390 --> 00:03:09,440
But the question that most students have is well how did you know to use background color and how did
36
00:03:09,440 --> 00:03:12,910
you know that blue as a color would work.
37
00:03:12,920 --> 00:03:15,350
Let's see how we can find out how to do this.
38
00:03:15,350 --> 00:03:26,930
So if I head over to Google and we search for change background color using CSX and we're going to tag
39
00:03:26,930 --> 00:03:32,870
on MDA at the end because that's our preferred documentation and you can see that the first link that
40
00:03:32,870 --> 00:03:40,970
shows up already takes us to the documentation on the background color and this page explains that the
41
00:03:40,970 --> 00:03:48,210
background color is a CSSA property which sets the background color of a particular element.
42
00:03:48,500 --> 00:03:58,940
So we've used this particular line to change the background color of our body a female element to blue.
43
00:03:58,940 --> 00:04:08,120
Now as it shows we can also do this using hex values or hexadecimal values so we can replace this really
44
00:04:08,210 --> 00:04:16,730
ugly looking blue with something that is custom and a really good tool for finding beautiful colors
45
00:04:16,730 --> 00:04:21,840
and beautiful color palette is a Web site called Calahan dot SEO.
46
00:04:22,220 --> 00:04:29,090
And here you've got professional designers who've curated some of their favorite color palette and they
47
00:04:29,090 --> 00:04:37,280
provided the hex codes to implement them in your own designs so you can search by hot or popular.
48
00:04:37,520 --> 00:04:42,470
And we're going to look for a nice color palette that is going to work for our particular project.
49
00:04:42,650 --> 00:04:50,330
So I'm going to choose this one and I'm just going to go ahead and copy the hex value of this nice sort
50
00:04:50,330 --> 00:04:58,590
of light pastel green blue color and I'm going to replace the word blue with that hex value.
51
00:04:58,700 --> 00:05:05,560
And remember whenever you using values it needs to have the pound sign or you might see it as the hashtags
52
00:05:05,640 --> 00:05:06,940
sign in front.
53
00:05:06,940 --> 00:05:14,530
Now as soon as we add that hex code you'll notice that one of our plugins that we installed in the beginning
54
00:05:14,920 --> 00:05:22,410
the one called pigments is highlighting that color to us to show us what it looks like when it's implemented.
55
00:05:22,570 --> 00:05:25,410
But we're going to verify that on our Web site as well.
56
00:05:25,420 --> 00:05:32,830
So let's go ahead and hit save and go back to our Web site and hit refresh and you can see that beautiful
57
00:05:32,830 --> 00:05:37,940
light green color is now showing across our Web page.
58
00:05:37,990 --> 00:05:45,250
So the other question that you might have is how can I figure out which colors I can use just by specifying
59
00:05:45,250 --> 00:05:49,950
the name of it and which ones I have to use as a hex value.
60
00:05:50,200 --> 00:05:56,950
Well again let's head over to Google and we're going to look for an answer to our query and I know that
61
00:05:56,950 --> 00:06:02,980
I've been banging on about this point but it's really really important because as a fully fledged web
62
00:06:02,980 --> 00:06:10,930
developer one of the most important skills is finding and figuring out how to do something that is specific
63
00:06:10,990 --> 00:06:12,380
to your needs.
64
00:06:12,400 --> 00:06:19,510
So inevitably at some point in your future career you will need to build features or implement things
65
00:06:19,720 --> 00:06:21,730
that we haven't ever talked about.
66
00:06:21,730 --> 00:06:27,520
And it's important that you really start building up this skill or figure out what are the best key
67
00:06:27,520 --> 00:06:28,750
words to search for.
68
00:06:28,780 --> 00:06:36,130
How do I structure my searches which sources am I going to go to be at google stack overflow MDA and
69
00:06:36,490 --> 00:06:40,710
in order to figure out how I can do this specific thing that I want to do.
70
00:06:40,870 --> 00:06:46,150
And that's why I want to show you my thought process in order to guide you on how you can start doing
71
00:06:46,150 --> 00:06:47,700
this for yourself as well.
72
00:06:47,890 --> 00:06:53,290
So whenever you come across something that you want to figure out or you want to do that isn't covered
73
00:06:53,290 --> 00:07:00,090
in the tutorials I want you to first give it a go looking and seeing if you can figure it out for yourself
74
00:07:00,370 --> 00:07:06,300
because this is one of the most important skills that you need to learn as a developer.
75
00:07:06,670 --> 00:07:15,190
So let's go ahead and search for CSSA colors and if we hit enter you'll see that Google has picked out
76
00:07:15,310 --> 00:07:23,120
this particular table on the M.D. and Web site and it has keywords and R.G. be hex values.
77
00:07:23,260 --> 00:07:25,920
So let's go and take a look at it in more detail.
78
00:07:26,020 --> 00:07:33,760
So this is a page that I recommend you bookmarking even because it describes the color CSSA data type
79
00:07:34,030 --> 00:07:36,610
that's available to you when you see access.
80
00:07:36,730 --> 00:07:43,870
And if you scroll down there's this really useful table that shows you the colors and the key words
81
00:07:43,870 --> 00:07:51,340
that you can use in order to implement these colors in your code without ever having to dive into the
82
00:07:51,340 --> 00:07:52,230
hex code.
83
00:07:52,480 --> 00:07:58,430
So for example maybe you want the background to be this powder blue.
84
00:07:58,460 --> 00:07:58,910
Right.
85
00:07:58,990 --> 00:08:06,310
So you can go ahead and simply copy this key word and instead of using the hex code we can simply use
86
00:08:06,310 --> 00:08:08,040
the word powder blue.
87
00:08:08,350 --> 00:08:15,640
And if we refresh our website you can see that that color is automatically rendered because it's recognized
88
00:08:16,060 --> 00:08:18,380
as a valid CSSA color.
89
00:08:18,400 --> 00:08:22,990
So this is a quick and easy way of implementing colors using CSSA.
90
00:08:22,990 --> 00:08:28,570
Now there's a whole range of other ways that you can change the color using C Ss and I'll leave you
91
00:08:28,570 --> 00:08:34,080
to read through this documentation and take a look at some of the other ways or some of the other palettes
92
00:08:34,210 --> 00:08:35,710
that you can tap into.
93
00:08:35,800 --> 00:08:43,660
Now heading back to our personal site the next thing that I want to change is the style of these horizontal
94
00:08:43,660 --> 00:08:51,730
rules and you might realize that there's a little bit of difficulty involved in doing this because as
95
00:08:51,730 --> 00:09:00,850
nice as it is modifying the style of a particular HDMI element by simply going into the tag and changing
96
00:09:00,850 --> 00:09:08,200
the style attribute it's a little bit cumbersome when you want to do that to many repeated elements.
97
00:09:08,200 --> 00:09:14,860
For example are horizontal rules because I have a total of about four of them and I would have to write
98
00:09:14,860 --> 00:09:20,940
up the CSSA code and copy and paste into each and every one of these tags.
99
00:09:21,010 --> 00:09:28,090
Now if at some point I decide to change one of these CSSA values say you know I actually prefer this
100
00:09:28,180 --> 00:09:35,470
light color over this powder blue and I'm going to change it back to that particular hex code.
101
00:09:35,650 --> 00:09:37,400
Then I would have to change it.
102
00:09:37,450 --> 00:09:42,340
Then I would have to remember to change it in all four places.
103
00:09:42,370 --> 00:09:44,600
And this is very very error prone.
104
00:09:44,740 --> 00:09:51,790
So in the next lesson I'm going to show you another way that you can implement CSSA code that will apply
105
00:09:51,880 --> 00:10:00,830
across the entire web page and it's by using internal CSSA so you can look for to that in the next see
106
00:10:00,830 --> 00:10:00,940
that.
12260
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.