Hello guys please help me whats wrong with this code

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:

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 :upside_down_face: :upside_down_face:

#box-1 {
background-color: dodgerblue;
height: 200px;
flex-basis: 10em;

}

#box-2 {
background-color: orangered;
height: 200px;
flex-basis: 20em;
}

2 Likes

Thank you so much that made me so stressed out, because i thought you should put flex-shrink too! LOL :sweat_smile:
(edit)WOW I LOVE FREECODECAMP I NEVER THOUGHT I WOULD GET A RESPONSE THX ALL OF YAL

2 Likes

Thank you too , you made my day :face_with_hand_over_mouth: :face_with_hand_over_mouth: Happy Holidays …
if you get stuck again i’m here … and if i didn’t understand anything i’ll ask too :upside_down_face:

1 Like

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 :slight_smile:

1 Like