In the following code, I have used the flex:
shorthand(flex-grow:, flex-shrink:, flex-basis:
) to solve this challenge.
However, the editor will recognize that flex-basis:
has been assigned yet not recognize the value.
This is conflicting behavior, as I was able to complete the prior challenges by substituting flex-grow:
and flex-shrink:
with the flex:
shorthand.
I may have just missed something but I thought I’d share:
<style>
#box-container {
display: flex;
height: 500px;
}
#box-1 {
background-color: dodgerblue;
height: 200px;
flex: 0 1 10em;
}
#box-2 {
background-color: orangered;
height: 200px;
flex: 0 1 20em;
}
</style>
<div id="box-container">
<div id="box-1"></div>
<div id="box-2"></div>
</div>
Your browser information:
User Agent is: Chrome/79.0.3945.88
.
Challenge: Use the flex-basis Property to Set the Initial Size of an Item
Link to the challenge:
https://www.freecodecamp.org/learn/responsive-web-design/css-flexbox/use-the-flex-basis-property-to-set-the-initial-size-of-an-item