CSS / DISPLAY PRACTICE · STEP 1 OF 6
Arrange study-session labels
Checking your account…
GUIDED PRACTICE
Arrange study-session labels
Open styles.css for this step. Follow the checklist, keeping your earlier work. Keep index.html unchanged during this step.
Your code stays in one editor through every step. Word wrap is enabled.
Step 1 of 6
Stack the session notices
A span is inline by default. Changing its display to block gives it a new line. The two notices will stack even though their HTML remains spans. CSS changes their layout, not their meaning.
Your task
Open styles.css for this step. Follow the checklist, keeping your earlier work. Keep index.html unchanged during this step.
To pass this step:
- In
styles.css, find the existing rule with selector.noticeoutside all media blocks. - Set its
displayproperty toblock. - Keep both notices and all supplied page content.
- Look for two orange rows in the preview.
Press the play button labeled Run & check this step below the editor to run your code and see your check results.
Your editor is opening.
Each step builds on the last. Finish the current step before opening the next one; your code stays with you.
This is one possible solution. Compare it with your own code; opening it does not replace your work or complete a step.
/* Change display rules below the supplied styles. */
/* STYLE BODY */
body {
margin: 20px;
font-family: Arial, sans-serif;
line-height: 1.5;
}
/* STYLE SECTION */
section {
margin-bottom: 24px;
}
/* STYLE CLASS NOTICE */
.notice {
background-color: #ffe3a8;
}
/* STYLE CLASS WORD */
.word {
background-color: #b9e8fa;
}
/* STYLE CLASS SNACK */
.snack {
background-color: #e5d0f5;
}
/* Your display rules */
/* STYLE CLASS NOTICE LATER RULE 2 */
.notice {
display: block;
}
/* STYLE CLASS WORD LATER RULE 2 */
/* STYLE CLASS SNACK LATER RULE 2 *//* Change display rules below the supplied styles. */
/* STYLE BODY */
body {
margin: 20px;
font-family: Arial, sans-serif;
line-height: 1.5;
}
/* STYLE SECTION */
section {
margin-bottom: 24px;
}
/* STYLE CLASS NOTICE */
.notice {
background-color: #ffe3a8;
}
/* STYLE CLASS WORD */
.word {
background-color: #b9e8fa;
}
/* STYLE CLASS SNACK */
.snack {
background-color: #e5d0f5;
}
/* Your display rules */
/* STYLE CLASS NOTICE LATER RULE 2 */
.notice {
display: block;
width: 220px;
}
/* STYLE CLASS WORD LATER RULE 2 */
/* STYLE CLASS SNACK LATER RULE 2 *//* Change display rules below the supplied styles. */
/* STYLE BODY */
body {
margin: 20px;
font-family: Arial, sans-serif;
line-height: 1.5;
}
/* STYLE SECTION */
section {
margin-bottom: 24px;
}
/* STYLE CLASS NOTICE */
.notice {
background-color: #ffe3a8;
}
/* STYLE CLASS WORD */
.word {
background-color: #b9e8fa;
}
/* STYLE CLASS SNACK */
.snack {
background-color: #e5d0f5;
}
/* Your display rules */
/* STYLE CLASS NOTICE LATER RULE 2 */
.notice {
display: block;
width: 220px;
}
/* STYLE CLASS WORD LATER RULE 2 */
.word {
display: inline;
}
/* STYLE CLASS SNACK LATER RULE 2 *//* Change display rules below the supplied styles. */
/* STYLE BODY */
body {
margin: 20px;
font-family: Arial, sans-serif;
line-height: 1.5;
}
/* STYLE SECTION */
section {
margin-bottom: 24px;
}
/* STYLE CLASS NOTICE */
.notice {
background-color: #ffe3a8;
}
/* STYLE CLASS WORD */
.word {
background-color: #b9e8fa;
}
/* STYLE CLASS SNACK */
.snack {
background-color: #e5d0f5;
}
/* Your display rules */
/* STYLE CLASS NOTICE LATER RULE 2 */
.notice {
display: block;
width: 220px;
}
/* STYLE CLASS WORD LATER RULE 2 */
.word {
display: inline;
width: 100px;
height: 40px;
}
/* STYLE CLASS SNACK LATER RULE 2 *//* Change display rules below the supplied styles. */
/* STYLE BODY */
body {
margin: 20px;
font-family: Arial, sans-serif;
line-height: 1.5;
}
/* STYLE SECTION */
section {
margin-bottom: 24px;
}
/* STYLE CLASS NOTICE */
.notice {
background-color: #ffe3a8;
}
/* STYLE CLASS WORD */
.word {
background-color: #b9e8fa;
}
/* STYLE CLASS SNACK */
.snack {
background-color: #e5d0f5;
}
/* Your display rules */
/* STYLE CLASS NOTICE LATER RULE 2 */
.notice {
display: block;
width: 220px;
}
/* STYLE CLASS WORD LATER RULE 2 */
.word {
display: inline;
width: 100px;
height: 40px;
}
/* STYLE CLASS SNACK LATER RULE 2 */
.snack {
display: inline-block;
width: 100px;
height: 40px;
}/* Change display rules below the supplied styles. */
/* STYLE BODY */
body {
margin: 20px;
font-family: Arial, sans-serif;
line-height: 1.5;
}
/* STYLE SECTION */
section {
margin-bottom: 24px;
}
/* STYLE CLASS NOTICE */
.notice {
background-color: #ffe3a8;
}
/* STYLE CLASS WORD */
.word {
background-color: #b9e8fa;
}
/* STYLE CLASS SNACK */
.snack {
background-color: #e5d0f5;
}
/* Your display rules */
/* STYLE CLASS NOTICE LATER RULE 2 */
.notice {
display: block;
width: 220px;
}
/* STYLE CLASS WORD LATER RULE 2 */
.word {
display: inline;
width: 100px;
height: 40px;
}
/* STYLE CLASS SNACK LATER RULE 2 */
.snack {
display: inline-block;
width: 100px;
height: 40px;
padding: 8px;
margin-right: 12px;
}Code and completed steps save in this browser when signed out. Sign in to save across devices.
Choose the copy to continue. Your account work will only be replaced if you choose this device.
Ready to checkRun the checks to see your results here.