Tell us what’s happening:
Your code so far
<style>
#box-container {
display: flex;
height: 500px;
}
#box-1 {
background-color: dodgerblue;
height: 200px;
flex-shrink: 1;
flex-basis: 10em;
}
#box-2 {
background-color: orangered;
height: 200px;
flex-shrink: 2;
flex-basis: 20em;
}
</style>
<div id="box-container">
<div id="box-1"></div>
<div id="box-2"></div>
</div>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
.
Challenge: Use the flex-basis Property to Set the Initial Size of an Item
Link to the challenge:
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
1 Like
I DID IT RIGHT but it kept saying set the value of box-1 to 10em and box-2 to 20em and i did but it still doesnt work
1 Like
Hi , i think you should delete the Flex-shrink
#box-1 {
background-color: dodgerblue;
height: 200px;
flex-basis: 10em;
}
#box-2 {
background-color: orangered;
height: 200px;
flex-basis: 20em;
}
1 Like
Thank you so much that made me so stressed out, because i thought you should put flex-shrink too! LOL
(edit)WOW I LOVE FREECODECAMP I NEVER THOUGHT I WOULD GET A RESPONSE THX ALL OF YAL
2 Likes
ok, btw HAPPY HOLIDAYS TO YOU TOO
2 Likes
am also here for you i just saw your question but it seems they have answered you
2 Likes
Hi, thank you very much for trying to help me out but they have already helped me out
1 Like