Add solution
For "Use the flex-basis Property to Set the Initial Size of an Item" challenge
This commit is contained in:
@ -73,8 +73,31 @@ tests:
|
|||||||
|
|
||||||
## Solution
|
## Solution
|
||||||
<section id='solution'>
|
<section id='solution'>
|
||||||
|
|
||||||
|
```html
|
||||||
|
<style>
|
||||||
|
#box-container {
|
||||||
|
display: flex;
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
|
|
||||||
```js
|
#box-1 {
|
||||||
// solution required
|
background-color: dodgerblue;
|
||||||
|
height: 200px;
|
||||||
|
flex-basis: 10em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#box-2 {
|
||||||
|
background-color: orangered;
|
||||||
|
height: 200px;
|
||||||
|
flex-basis: 20em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="box-container">
|
||||||
|
<div id="box-1"></div>
|
||||||
|
<div id="box-2"></div>
|
||||||
|
</div>
|
||||||
```
|
```
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
Reference in New Issue
Block a user