Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
Input padding and margins into your mock up in order to set guides for your elements
Don't forget to check out the Downloads tab for your project files
Helpful Links
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
In this video, we'll be creating and
using shapes, in this case,
0:00
rectangles that will act as guides.
0:04
Remember, guides are not
seen in the final design.
0:07
They just help us to arrange the content.
0:10
The padding area is the space between
the content of the element and the border.
0:13
In this case, it is the space between
the content of the website and
0:18
the frame of the browser window.
0:22
We are going to create boxes that
will represent the padding area.
0:24
This helps us to be precise
with our measurements.
0:29
We'll be creating 100 pixel and 50 pixel
wide padding along the vertical sides.
0:32
First, to do this we need
to create a rectangle.
0:40
The rectangle or
shape tool is here in our tool bars.
0:44
And if you click and hold you can see that
we have some different tools we could be
0:49
using so rounded rectangles,
ellipse tool, polygon tool and star tool.
0:54
We're gonna be using the rectangle tool,
which is M as your shortcut key.
1:01
Anytime you are drawing
shapes in Illustrator,
1:07
any shape is going to have a fill and
a stroke.
1:11
The fill is going to be
the inside of your shape and
1:17
the stroke will be the line itself.
1:21
And you can choose to have no fill and
just a stroke or,
1:23
in this case, a fill and no stroke.
1:28
To change the color, so if I wanted
to change the color of my fill,
1:31
I'm gonna double-click and
I chose a sort of bright green.
1:34
Because these are guides and
they're not going to show up in the final.
1:41
So for me I just want to choose
a color that's going to be bright and
1:45
stand out against the grey that
I'm using in my wire frame.
1:49
So I'm going to hit OK, if I wanted
to have a stroke color I could just
1:53
click on it and then double click and
here add a stroke this way.
1:57
All right, so just to start,
I'm going to keep the stroke on for now.
2:03
And with my rectangle tool selected,
I'm gonna go up in the top,
2:07
left-hand corner of my mobile artboard.
2:12
And you can see my smart guides
are working hard to tell me exactly where
2:15
the sides interact, so
I can get right on there.
2:20
The width and
height information are coming up.
2:24
I want the first patty I'm gonna
make is gonna be 100 pixels wide.
2:27
So you can see I couldn't get it quite
exact, and a way you can go back and
2:32
enter in your height and
width is with your rectangle selected.
2:38
Come over here in your control panel and
hit Transform.
2:43
And we want it to be 100 by 1400.
2:48
And I'm going to click
on my Selection tool and
2:57
just sort of click off and zoom in.
3:01
I want to make sure my shape is lined
up where it needs to be, which it is.
3:06
That's great.
3:12
And as you can see,
it has a blue stroke with a green fill.
3:14
If I wanted to increase
the size of my stroke,
3:21
I could come up here and change this.
3:24
Oh, you gotta have that rectangle selected
or nothing's gonna happen for that shape.
3:27
And now, you can see, I can change this.
3:33
I'm going to change my stroke to none
because I only need the fill now.
3:37
And to do that, you have stroke on top,
your stroke's on top and then,
3:43
I'm gonna hit none which is this
red line running through it.
3:46
Great.
3:51
Okay.
3:53
And now that we have a 100 pixel rectangle
marker we're going to do 50 pixels wide.
3:53
I'll zoom out a little bit.
4:01
Make sure that no other
objects are selected,
4:04
cuz we're gonna be creating a new object,
and I'm gonna do exactly the same thing.
4:07
So we go up into the top corner,
see where it says intersect,
4:11
that's where I need to be,
that's where the corners are intersecting.
4:15
I'm gonna try and get this right.
4:18
Ooh, it wants to, it's really close,
but it's not gonna happen.
4:21
So I go right back up here and
make it 50 by 1400,
4:25
because our pixel padding
is 50 pixels wide and
4:29
always the same length of the design.
4:33
So 1400 in this case.
4:36
I'm gonna zoom in,
make sure this is where it needs to be.
4:40
Okay.
4:48
And right now, we have two shapes,
but they are the same color and
4:50
they're on top of each other.
4:54
So we can't really differentiate the two.
4:56
A work around is that we can lower
the opacity of these shapes and
4:58
create transparency in the layers.
5:03
So, I'm gonna select both of these shapes,
and then up here,
5:06
in our control panel, it says Opacity,
and I'm gonna make it 50%,
5:11
so that both of these
shapes are just 50% opaque.
5:17
And now when I click off, you can see
exactly, okay, this is 50 pixels in,
5:21
this is 100 pixels in.
5:26
So you can see how we're creating
really precise markers for
5:29
ourselves as we're building the site.
5:34
Now I want to copy these and
have them on all vertical sides.
5:37
We can do this quickly by creating
new instances of the same objects.
5:42
To create a new instance of a shape,
first you select the shape.
5:47
So, I'm going to select
my 100 pixel padding.
5:52
Hover your mouse over the shape that you
want to create a new instance or copy of.
5:55
Hold down option, and when you do that
you're going to get this double arrow.
6:01
And now with option depressed,
click and hold and drag out.
6:07
And you can drag it anywhere in
the whole document actually, but
6:12
if you hold down shift,
that will constrain your movement.
6:17
Cuz we really just wanna
go straight across.
6:22
So I'm gonna go right over here until it
pops into place with my smart guides, and
6:24
I'll do the same thing,
I'll zoom in a little bit.
6:28
I'll make it [LAUGH] easier.
6:30
Hold down Option, click, hold, and drag.
6:32
I'm also holding down Shift
to constrain proportions.
6:37
Perfect.
6:41
And now I'm gonna do exactly the same
thing, but with the 50 pixel padding.
6:42
So I'll click on my rectangle.
6:47
Hold down Option.
6:50
Click and hold and
drag to create a copy of that.
6:52
And let go,
right when it meets up to the edge here.
6:56
I'm just going to do the same thing.
7:00
There we go.
7:03
Click off.
7:04
Okay, wonderful.
7:08
And now that we have precise measurements,
let's add guides on top of this.
7:10
So using our ruler guides,
as I showed you before,
7:17
when I click a vertical ruler side and
drag.
7:22
And right where that perforated
edge is over the 50 pixel,
7:25
that where we're gonna let go.
7:29
And because we're using smart guides
it's going to help us drop those off at
7:31
the correct places.
7:36
So I'm just popping these in.
7:37
Again, to create a ruler guide,
you click and hold and drag.
7:53
For some reason that one doesn't
wanna line up just right.
8:06
So I'm gonna make sure
it lines up just right.
8:09
Okay.
8:12
That's what you gotta do.
8:13
Wonderful.
8:16
Okay.
8:17
Next, we're going to be
organizing our layers.
8:19
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up