#100DaysOfWeb in Python Transcripts
Chapter: Days 13-16: CSS Layout and Design
Lecture: Concept: Controlling the box in CSS
0:00 Let's review how we control the box layout in CSS.
0:04 So we have our CSS file over here.
0:07 site.css, and we're going to apply this to the lead.
0:10 Now this has to be something like block
0:13 or inline-block for display, otherwise it doesn't work.
0:15 And then we just set things like the padding.
0:18 I'm going to say padding all the way around is 5.
0:20 Oh except for the left, make that 10.
0:22 Now we say the margin all the way around is 5 as well.
0:25 Then we can set a border by saying the width
0:28 the style, it could be dashed or solid
0:31 things like that, and then the color.
0:33 Right, so that could be hexadecimal
0:34 or something written out that CSS and web browsers
0:37 understand, like white, gray, black, so on.
0:40 On the padding one here, there is a way to specify
0:44 I want, and one line padding is like
0:46 5, 5, 5, zero, sorry, 5, 5, 5, 10
0:50 something like that.
0:51 And I always forget, is it top and bottom
0:54 left and right, left, top, bottom, right.
0:56 Whatever it happens to be.
0:57 So I'd like to be more explicit
0:59 and you know, explicitly call out
1:01 when I'm doing something funky
1:02 like setting the left to be different.
1:04 But other people like to mix it all together.
1:07 Right, whatever works for you.
1:08 Feel free to roll with that.