Испытание: анонс поста [18/18]

Прошу критики

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

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

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

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

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

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

.post-date, .post-type {
position: absolute;
left: -75px;
width: 55px;
height: 55px;
border-bottom: 5px solid #bdc3c7;
}

.post-date {
top: 0;
background-color: #fff;
text-align: center;
line-height: 55px;
vertical-align: middle;
font-size: 15px;
font-weight: bold;
color: #7f8c8d;
}

.post-type {
top: 70px;
background-color: #7f8c8d;
background-image: url("/assets/course14/quotes.png");
background-repeat: no-repeat;
background-position: 50% 50%;
}

.post-author {
color: #7f8c8d;
padding: 5px 0
}

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

.icon-tags, .icon-comments {
position: absolute;
left: 0;
top: 0;
background-image: url("/assets/course14/post-challenge.png");
background-repeat: no-repeat;
}

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

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

.post-text {
color: #7f8c8d;
background-color: #fff;
padding: 10px 15px;
border-bottom: 5px solid #bdc3c7;
margin-right: 10px
}

Хороший код, остается избавиться от отрицательной координаты и будет идеально.

Если правильно понял, то отрицательные отступы желательно не использовать. То есть так лучше?

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

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

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

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

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

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

.post-date, .post-type {
position: absolute;
left: 0;
width: 55px;
height: 55px;
border-bottom: 5px solid #bdc3c7;
}

.post-date {
top: 0;
background-color: #fff;
text-align: center;
line-height: 55px;
vertical-align: middle;
font-size: 15px;
font-weight: bold;
color: #7f8c8d;
}

.post-type {
top: 70px;
background-color: #7f8c8d;
background-image: url("/assets/course14/quotes.png");
background-repeat: no-repeat;
background-position: 50% 50%;
}

.post-author {
color: #7f8c8d;
padding: 5px 0
}

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

.icon-tags, .icon-comments {
position: absolute;
left: 0;
top: 0;
background-image: url("/assets/course14/post-challenge.png");
background-repeat: no-repeat;
}

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

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

.post-text {
color: #7f8c8d;
background-color: #fff;
padding: 10px 15px;
border-bottom: 5px solid #bdc3c7;
margin-right: 10px
}

Спасибо!

Да, теперь отлично.

1 лайк