--- id: 6145fc3707fc3310c277f5c8 title: Step 44 challengeType: 0 dashedName: step-44 --- # --description-- Torniamo allo styling della pagina. Seleziona gli elementi della lista all'interno della barra di navigazione e assegna loro i seguenti stili: ```css color: #dfdfe2; margin: 0 0.2rem; padding: 0.2rem; display: block; ``` # --hints-- Dovresti usare il selettore `nav li` o `nav > ul > li`. ```js const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); assert.exists(gs('nav li') || gs('nav > ul > li')); ``` Dovresti dare agli elementi `li` una proprietà `color` del valore di `#dfdfe2`. ```js const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); const color = gs('nav li')?.color ?? gs('nav > ul > li')?.color; assert.equal(color, 'rgb(223, 223, 226)'); ``` Dovresti dare agli elementi `li` una proprietà `margin` del valore di `0 0.2rem`. ```js const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); const margin = gs('nav li')?.margin ?? gs('nav > ul > li')?.margin; assert.equal(margin, '0px 0.2rem'); ``` Dovresti dare agli elementi `li` un `padding` di `0.2rem`. ```js const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); const padding = gs('nav li')?.padding ?? gs('nav > ul > li')?.padding; assert.equal(padding, '0.2rem'); ``` Dovresti dare agli elementi `li` una proprietà `display` con il valore `block`. ```js const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); const display = gs('nav li')?.display ?? gs('nav > ul > li')?.display; assert.equal(display, 'block'); ``` # --seed-- ## --seed-contents-- ```html Accessibility Quiz

HTML/CSS Quiz

Student Info

HTML

1

The legend element represents a caption for the content of its parent fieldset element

2

A label element nesting an input element is required to have a for attribute with the same value as the input's id

CSS

``` ```css body { background: #f5f6f7; color: #1b1b32; font-family: Helvetica; margin: 0; } header { width: 100%; height: 50px; background-color: #1b1b32; display: flex; } #logo { width: max(100px, 18vw); background-color: #0a0a23; aspect-ratio: 35 / 4; padding: 0.4rem; } h1 { color: #f1be32; font-size: min(5vw, 1.2em); } nav { width: 50%; max-width: 300px; height: 50px; } nav > ul { display: flex; justify-content: space-evenly; } --fcc-editable-region-- --fcc-editable-region-- h1, h2 { font-family: Verdana, Tahoma; } h2 { border-bottom: 4px solid #dfdfe2; } p::before { content: "Question #"; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } ```