- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The heading with description in flexboxes</title>
<link href="course.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body class="subtle">
<section class="card">
<h1 class="card-title">
<span class="card-title-main">Muffin against flexboxes</span>
<span class="card-title-note">A coming-of-age story</span>
</h1>
<p>Over the course of his long career as a front-end web developer, Muffin has seen a lot of confusing solutions: the standard block model where the width is not exactly the width of the block, vertical margins that are assigned as percentages and that are for some reason not calculated on the basis of the parent’s height, but on the basis of its width, and many other strange of things.</p>
<p>However, during the last month, he has become increasingly puzzled about a new method for laying out pages: flexboxes. He kept re-reading the specification only to be surprised every time: “Why is it so complicated? As though we didn’t already have enough regular tables!”</p>
<p>But the pace of technological change is relentless, and Muffin, clutching his paw into a fist of resolve, could only try to keep up with these developments.</p>
</section>
</body>
</html>
CSS
.card {
margin-bottom: 20px;
line-height: 1.3;
}
.card-title {
margin-top: 0;
}
.card-title span {
}
.card-title-main {
}
You’ve gone to a different page
Goalscompleted
0
- For the spans inside the
.card-title
block, set the background color to#c8dcff
and a solid frame that is1px
thick and with the color#999999
. - Then assign a flexbox layout for
.card-title
, - and align the flex items to the end of the cross axis.
- Assign a growth factor of
1
to the.card-title-main
block.
Comments