---
id: bad87fee1348bd9aedf08826
title: Use Clockwise Notation to Specify the Padding of an Element
challengeType: 0
videoUrl: https://scrimba.com/c/cB7mBS9
forumTopicId: 18346
localeTitle: Использовать по часовой стрелке для указания заполнения элемента
---
## Description
Вместо того, чтобы отдельно указывать свойства padding-top
, padding-right
, padding-bottom
и padding-left
, вы можете указать их все в одной строке, например: padding: 10px 20px 10px 20px;
Эти четыре значения работают как часы: верх, правый, нижний, левый и будут давать то же самое, что и при использовании спецификаций дополнений для конкретной стороны.
## Instructions
Используйте «По часовой стрелке», чтобы присвоить классу «.blue-box» padding
40px
на верхней и левой стороне, но только 20 20px
на нижней и правой стороне.
## Tests
```yml
tests:
- text: Your blue-box
class should give the top of elements 40px
of padding
.
testString: assert($(".blue-box").css("padding-top") === "40px");
- text: Your blue-box
class should give the right of elements 20px
of padding
.
testString: assert($(".blue-box").css("padding-right") === "20px");
- text: Your blue-box
class should give the bottom of elements 20px
of padding
.
testString: assert($(".blue-box").css("padding-bottom") === "20px");
- text: Your blue-box
class should give the left of elements 40px
of padding
.
testString: assert($(".blue-box").css("padding-left") === "40px");
- text: You should use the clockwise notation to set the padding of blue-box
class.
testString: const removeCssComments = str => str.replace(/\/\*[\s\S]+?\*\//g, '');assert(/\.blue-box\s*{[\s\S]*padding[\s]*:\s*\d+px\s+\d+px\s+\d+px\s+\d+px(;\s*[^}]+\s*}|;?\s*})/.test(removeCssComments($('style').text())));
```
## Challenge Seed
```html
margin
padding
padding
```
## Solution
```html
margin
padding
padding
```