scrimba
Frontend Career Path
Web dev basics
Build a digital Business Card
Center the text via inheritance
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Center the text via inheritance
AboutCommentsNotes
Center the text via inheritance
Expand for more info
styles.css
run
preview
console
/*
Challenge:
Center the text in the <p> and <h4> elements.

Note: you should only add ONE property, as inheritance
should take care of applying it to both elements.
*/

body {
margin: 20px;
}

.avatar {
width: 150px;
}

.card {
width: 400px;
margin-left: auto;
margin-right: auto;
padding: 20px;
display: flex;
justify-content: space-around;
}

.border-blue {
border: 1px dotted blue;
}

Console
/index.html
-2:57