- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>flex-shrink and min-width</title>
<link href="course.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body class="world world-flat">
<div class="spot">
<div class="skate no-width racoon-green"></div>
<div class="skate no-width racoon-brown"></div>
<div class="ruler ruler-green w-75">75px</div>
<div class="ruler ruler-brown w-225 l-75">225px</div>
<div class="ruler ruler-negative w-100 l-300">−100px</div>
</div>
</body>
</html>
CSS
.spot {
display: flex;
margin-left: 50px;
padding: 10px 0;
width: 300px;
height: 200px;
}
.racoon-green {
flex-shrink: 1;
flex-basis: 100px;
}
.racoon-brown {
flex-shrink: 1;
flex-basis: 300px;
}
You’ve gone to a different page
Goalscompleted
0
- Assign a zero shrinkage factor to the Brown Raccoon (
.racoon-brown
). - Then assign a minimum width of
50px
- as well as
25px
inner margins to the Green Raccoon (.racoon-green
).
Comments