2021-09-10 09:17:03 -07:00
---
2022-02-10 08:27:55 -08:00
id: 60a3e3396c7b40068ad6998b
2021-10-21 10:07:52 -07:00
title: Step 33
2021-09-10 09:17:03 -07:00
challengeType: 0
2021-10-21 10:07:52 -07:00
dashedName: step-33
2021-09-10 09:17:03 -07:00
---
# --description--
2022-02-10 08:27:55 -08:00
It's helpful to have your margins push in one direction.
In this case, the bottom margin of the `.one` element pushes `.two` down 20 pixels.
In the `.two` selector, use `margin` shorthand property to set top margin to `0` , horizontal margin to `auto` , and bottom margin to `20px` . This will remove its top margin, horizontally center it, and set its bottom margin to 20 pixels.
2021-09-10 09:17:03 -07:00
# --hints--
2022-02-10 08:27:55 -08:00
You should set the `margin` property to `0 auto 20px` .
2021-09-10 09:17:03 -07:00
```js
2022-02-10 08:27:55 -08:00
const hasMargin = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style.margin === '0px auto 20px');
assert(hasMargin);
2021-09-10 09:17:03 -07:00
```
2022-02-10 08:27:55 -08:00
Your `.two` element should have a `margin` value of `0 auto 20px` .
2021-09-10 09:17:03 -07:00
```js
2022-02-10 08:27:55 -08:00
const twoMargin = new __helpers.CSSHelp(document).getStyle('.two')?.getPropertyValue('margin');
assert(twoMargin === '0px auto 20px');
2021-09-10 09:17:03 -07:00
```
# --seed--
## --seed-contents--
```css
.canvas {
width: 500px;
height: 600px;
background-color: #4d0f00 ;
overflow: hidden;
}
.frame {
border: 50px solid black;
width: 500px;
padding: 50px;
margin: 20px auto;
}
.one {
width: 425px;
height: 150px;
background-color: #efb762 ;
2022-02-10 08:27:55 -08:00
margin: 20px auto;
2021-09-10 09:17:03 -07:00
}
.two {
width: 475px;
height: 200px;
background-color: #8f0401 ;
2022-02-10 08:27:55 -08:00
--fcc-editable-region--
2021-09-10 09:17:03 -07:00
margin: auto;
2022-02-10 08:27:55 -08:00
--fcc-editable-region--
2021-09-10 09:17:03 -07:00
}
.three {
width: 91%;
height: 28%;
background-color: #b20403 ;
2022-02-10 08:27:55 -08:00
margin: auto;
2021-09-10 09:17:03 -07:00
}
```
```html
<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "UTF-8" >
2022-03-14 15:54:43 +00:00
< title > Rothko Painting< / title >
2021-09-10 09:17:03 -07:00
< link href = "./styles.css" rel = "stylesheet" >
< / head >
< body >
< div class = "frame" >
< div class = "canvas" >
< div class = "one" > < / div >
< div class = "two" > < / div >
< div class = "three" > < / div >
< / div >
< / div >
< / body >
< / html >
```