--- id: 5f45a276c093334f0f6e9df4 title: Step 74 challengeType: 0 dashedName: step-74 --- # --description-- Se consideriamo le voci sul menu e i prezzi, c'è un divario abbastanza grande tra ogni linea. Assegna alle proprietà margin-top e margin-bottom il valore `5px` per tutti gli elementi `p` annidati in elementi di classe `item`. # --hints-- Dovresti assegnare alla proprietà `margin-top` il valore `5px`. ```js const hasMarginTop = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['margin-top'] === '5px'); assert(hasMarginTop); ``` Dovresti assegnare alla proprietà `margin-bottom` il valore `5px`. ```js const hasMarginBottom = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['margin-bottom'] === '5px'); assert(hasMarginBottom); ``` Dovresti utilizzare il selettore `.item p` esistente. ```js const hasOneSelector = new __helpers.CSSHelp(document).getStyleDeclarations('.item p'); assert(hasOneSelector.length === 1); ``` Gli elementi `p` annidati negli elementi `.item` dovrebbero avere una proprietà `margin-top` con il valore `5px`. ```js const itemPMarginTop = new __helpers.CSSHelp(document).getStyle('.item p')?.getPropertyValue('margin-top'); assert(itemPMarginTop === '5px'); ``` Gli elementi `p` annidati negli elementi `.item` dovrebbero avere una proprietà `margin-bottom` con il valore `5px`. ```js const itemPMarginBottom = new __helpers.CSSHelp(document).getStyle('.item p')?.getPropertyValue('margin-bottom'); assert(itemPMarginBottom === '5px'); ``` # --seed-- ## --seed-contents-- ```html Cafe Menu ``` ```css body { background-image: url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg); font-family: sans-serif; padding: 20px; } h1 { font-size: 40px; } h2 { font-size: 30px; } .established { font-style: italic; } h1, h2, p { text-align: center; } .menu { width: 80%; background-color: burlywood; margin-left: auto; margin-right: auto; padding: 20px; max-width: 500px; } hr { height: 2px; background-color: brown; border-color: brown; } --fcc-editable-region-- h1, h2 { font-family: Impact, serif; } .item p { display: inline-block; } .flavor, .dessert { text-align: left; width: 75%; } .price { text-align: right; width: 25% } --fcc-editable-region-- ```