scrimba
CSS Flexbox
Align Elements Using the align-items Property
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

Align Elements Using the align-items Property
AboutCommentsNotes
Align Elements Using the align-items Property
Expand for more info
index.html
run
preview
console
<style>
#box-container {
background: gray;
display: flex;
height: 500px;

}
#box-1 {
background-color: dodgerblue;
width: 200px;
font-size: 24px;
}

#box-2 {
background-color: orangered;
width: 200px;
font-size: 18px;
}
</style>

<div id="box-container">
<div id="box-1"><p>Hello</p></div>
<div id="box-2"><p>Goodbye</p></div>
</div>
Console
index.html
-1:24