Код:
<!DOCTYPE html>
<html lang="ru">
<head>
<title>Завершаем главную: наполнение</title>
<meta charset="utf-8">
</head>
<body>
<header class="page-header">
<div class="logo">
<img src="/assets/course73/logo.svg" width="90" height="90">
</div>
<nav class="main-menu">
<ul>
<li><a href="#home">Главная</a></li>
<li><a href="#blog">Посты</a></li>
<li><a href="#me">Обо мне</a></li>
</ul>
</nav>
</header>
<main>
<article class="blog-entry">
<aside class="video-preview">
<img src="/assets/course73/preview.jpg" alt="Видео превью">
</aside>
<section class="idea">
<h1>Размышления о жизни</h1>
<p>Существует много вещей, которые безразличны собакам, но кошки от них без ума.</p>
<p>К примеру, любимое место кота — это клавиатура компьютера. Собака не будет постоянно спать на клавиатуре.</p>
</section>
</article>
<section class="photos">
<figure class="slides">
<img src="/assets/course73/keks-1.jpg" alt="keks-1">
<img src="/assets/course73/keks-2.jpg" alt="keks-2">
<img src="/assets/course73/keks-3.jpg" alt="keks-3">
<img src="/assets/course73/keks-4.jpg" alt="keks-4">
<img src="/assets/course73/keks-5.jpg" alt="keks-5">
</figure>
</section>
</main>
<footer class="page-footer">
<section class="info">
<img src="/assets/course73/keks.jpg" width="50" alt="keks">
Кекс, keks@htmlacademy.ru
</section>
<section class="copyright">
© 2008—2014 Cat Energy
<section>
</footer>
</body>
</html>
Стили:
html,
body {
margin: 0;
padding: 0;
font-size: 100%;
font-family: "Arial", "Helvetica Neue", "Helvetica", sans-serif;
color: white;
background-color: #2c3e50;
}
body {
width: 553px;
}
a:link,
a:visited,
a:hover,
a:active {
color: #c0392b;
}
/* Header */
header.page-header {
position: relative;
z-index: 5;
min-height: 20px;
padding: 20px;
color: white;
background-image:
linear-gradient(45deg, #34495e 25%, transparent 25%),
linear-gradient(-45deg, #34495e 25%, transparent 25%),
linear-gradient(135deg, #34495e 25%, transparent 25%),
linear-gradient(-135deg, #34495e 25%, transparent 25%);
background-position: 10px 0, 10px 0, 0 0, 0 0;
background-size: 20px 20px;
box-shadow: 0 0 5px 0 #333333;
}
div.logo {
position: absolute;
top: 10px;
left: 20px;
width: 90px;
height: 90px;
margin: 0;
}
nav.main-menu ul {
margin: 0;
margin-left: 130px;
padding: 0;
list-style: none;
}
.main-menu li {
display: inline-block;
margin-right: 1em;
}
.main-menu a {
color: white;
}
/* Main */
main {
display: block;
min-height: 200px;
padding-top: 50px;
color: black;
background-color: white;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAMAAAApB0NrAAAABlBMVEX///+pqalTpKl9AAAAAnRSTlMAGovxNEIAAAAdSURBVDjLY2AAAUaG4UYxDDsfjfp91O+jfqfE7wCzpQCw/dq+qQAAAABJRU5ErkJggg==");
}
main::after,
.slides::after {
content: "";
display: table;
clear: both;
}
article.blog-entry {
min-height: 100px;
margin: 0 20px;
padding: 10px;
background-color: rgba(241, 196, 15, 0.1);
border-radius: 5px;
box-shadow: 0 0 3px #cccccc;
}
.blog-entry::after {
content: "";
display: table;
clear: both;
}
section.idea {
float: left;
width: 46%;
min-height: 100px;
padding: 2%;
background-color: rgba(243, 156, 18, 0.1);
border-radius: 5px;
}
.idea > p {
margin: 1em 0;
font-size: 0.8em;
}
.idea > p:last-child {
margin: 0;
}
.idea > h1 {
margin: 0;
font-size: 0.9em;
}
aside.video-preview {
float: right;
width: 46%;
margin: 0 0 1em 0.5em;
padding: 0.3em 0.3em 0.65em;
background: #ffffff;
box-shadow: 0 0 5px 3px rgba(243, 156, 18, 0.2);
}
.video-preview > img {
width: 100%;
}
section.photos {
min-height: 50px;
margin: 20px 0;
background: #f5f5f5;
box-shadow: 0 0 5px #cccccc;
}
figure.slides {
margin: 0 20px;
padding: 10px;
}
.slides > img {
float: left;
margin-right: 16px;
}
.slides > img:last-child {
margin-right: 0;
}
/* Footer */
footer.page-footer {
min-height: 50px;
padding: 20px;
font-size: 14px;
color: black;
background-color: #f1c40f;
background-image:
linear-gradient(45deg, transparent 50%, white 50%),
linear-gradient(-45deg, transparent 50%, white 50%),
linear-gradient(135deg, transparent 50%, #2c3e50 50%),
linear-gradient(-135deg, transparent 50%, #2c3e50 50%);
background-repeat: repeat-x;
background-position: 0 0, 0 0, 0 100%, 0 100%;
background-size: 10px 12px;
}
.page-footer::after {
content: "";
display: table;
clear: both;
}
.page-footer .info {
float: left;
}
.page-footer .info img {
margin-right: 0.5em;
vertical-align: middle;
border: 2px solid white;
box-shadow: 0 0 4px #c0392b;
transform: rotate(-5deg);
}
.page-footer .copyright {
float: right;
padding-top: 20px;
font-size: 12px;
}
Задание слишком легко прошел, в чем подвох?