Мастерская: декоративные элементы [18/18] 99%

Не могу понять почему 99%. Помогите, пожалуйста!

html,
body {
margin: 0;
padding: 0;
}

body {
width: 280px;
min-height: 250px;
padding-top: 50px;
padding-right: 10px;
padding-left: 10px;

font-size: 12px;
line-height: 1.2;
font-family: “Arial”, sans-serif;
color: #7f8c8d;

background-color: #ecf0f1;
}

.post-stats .icon {
width: 15px;
height: 15px;
}

.post {
display: inline-block;
margin-left: 75px;
}

.post a{
text-decoration: none;
color: #2980b9;
}

.post-title {
font-size: 20px;
color: #2980b9;
}

.post-date {
display: flex;
justify-content: center;
align-items: center;

position: absolute;
left: 10px;
top: 50px;
width: 55px;
height: 55px;
font-weight: bold;
background-color: #ffffff;
font-size: 15px;
box-shadow: #bdc3c7 0px 5px;
}

.post-type {
position: absolute;
left: 10px;
top: 120px;
width: 55px;
height: 55px;
font-size: 15px;
box-shadow: #bdc3c7 0px 5px;
background: center url(“quotes.png”) no-repeat;
background-color: #7f8c8d;
}

.post-author {
padding-top: 5px;
}

.post-stats{
display: inline-block;
margin-top: -15px;
margin-left: 20px;
}

.icon-comments + a {
display: inline-block;
position: relative;
left: 10px;
}

.post-stats .icon-tags {
display: block;
width: 20px;
height: 20px;
position: relative;
top: 20px;
left: -20px;
background: 0 0 url(“post-challenge.png”) no-repeat;
}

.post-stats .icon-comments {
width: 20px;
height: 20px;
position: relative;
top: 20px;
left: -15px;
background: -15px 0 url(“post-challenge.png”) no-repeat;
}

.post-text {
background-color: #ffffff;
padding: 10px 15px;
width: 165px;
box-shadow: #bdc3c7 0px 5px;
}

Лишнее.

1 лайк

Немного напутано с позиционированием и отступами.
Лучше ещё раз пройти курс https://htmlacademy.ru/courses/45/run/1,
и разобраться где и почему нужен relative, и где и почему absolute.

Например: .post-date и .post-type позиционированы относительно окна браузера.
Т.е. если карточку сдвинуть – .post-date и .post-type останутся там же.2018-12-13_042503


примерно так
html,
body {
	margin: 0;
	padding: 0;
}

body {
	width: 280px;
	min-height: 250px;
	padding: 50px 10px;
	font-size: 12px;
	font-family: "Arial", sans-serif;
	line-height: 1.2;
	color: #7f8c8d;
	background: #ecf0f1;
}

.post {
	position: relative;
	padding-left: 75px;
}

.post .post-date{
	position: absolute;
	width: 55px;
	height: 55px;
	top: 0;
	left: 0;
	text-align: center;
	font-size: 15px;
	font-weight: bold;
	line-height: 55px;
	background-color: #fff;
	border-bottom: 5px solid #bdc3c7;
}

.post .post-type {
	position: absolute;
	width: 55px;
	height: 55px;
	top: 70px;
	left: 0;
	background: #7f8c8d url("quotes.png") no-repeat 50% 50%;
	border-bottom: 5px solid #bdc3c7;
}

.post .post-title{
	font-size: 20px;
	color: #2980b9;
}

.post .post-author{
	margin: 5px 0;
}

.post a {
	color: #2980b9;
	text-decoration: none;
}

.post .post-stats{
	display: inline-block;
	position: relative;
	vertical-align: top;
	margin-right: 10px;
	padding-left: 20px;
}

.post-stats .icon {
	position: absolute;
	width: 15px;
	height: 15px;
	left: 0;
	top: 0;
	background: url("post-challenge.png") no-repeat;
}

.post-stats .icon-tags{
	background-position: 0 0;
}

.post-stats .icon-comments{
	background-position: -20px 0;
}

.post .post-text{
	width: 165px;
	padding: 10px 15px;
	background-color: #fff;
	border-bottom: 5px solid #bdc3c7;
}

Действительно. Чувствую, что плаваю, попробую разобраться с этой темой заново. Спасибо!