Вспотел! Собрал! Но не нравится.
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;
}
.post {
position: relative;
left: 75px;
}
.post-title {
font-size: 20px;
color: #2980b9;
margin-bottom: 5px;
}
.post-date {
position: absolute;
top: 0;
left: -75px;
width: 55px;
line-height: 55px;
font-size: 15px;
font-weight: bold;
text-align: center;
background: #ffffff;
border-bottom: 5px solid #bdc3c7;
}
.post-type {
position: absolute;
top: 70px;
left: -75px;
width: 55px;
height:55px;
background: #7f8c8d url(/assets/course14/quotes.png) no-repeat 50% 50%;
border-bottom: 5px solid #bdc3c7;
}
.post a {
text-decoration: none;
color: #2980b9;
}
.post-stats {
display: inline-block;
padding-left: 20px;
margin-right: 10px;
margin-top: 5px;
}
.post-stats .icon {
position: absolute;
width: 15px;
height: 15px;
}
.icon-tags {
left: 0px;
background: url(/assets/course14/post-challenge.png) 0px 0px ;
}
.icon-comments {
right: 113px;
background: url(/assets/course14/post-challenge.png) 20px 0px ;
}
.post-text {
width: 165px;
background: #ffffff;
padding: 10px 15px;
border-bottom: 5px solid #bdc3c7;
}
Ineska
2
Мне тоже не нравится пара моментов.
Отступ сначала 75px, а ниже -75рх. И не хватает position: relative; для .post-stats.
.post вообще не позиционировать?
Ineska
4
Только position, без координат. Вместо этого внутренний отступ 75px.
Где-то читал, что негоже применять отступы к позиционированным элементам.
Так красивше!
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;
}
.post {
position: relative;
padding-left: 75px;
}
.post-title {
font-size: 20px;
color: #2980b9;
margin-bottom: 5px;
}
.post-date {
position: absolute;
left: 0px;
top: 0;
width: 55px;
line-height: 55px;
font-size: 15px;
font-weight: bold;
text-align: center;
background: #ffffff;
border-bottom: 5px solid #bdc3c7;
}
.post-type {
position: absolute;
top: 70px;
left: 0px;
width: 55px;
height:55px;
background: #7f8c8d url(/assets/course14/quotes.png) no-repeat 50% 50%;
border-bottom: 5px solid #bdc3c7;
}
.post a {
text-decoration: none;
color: #2980b9;
}
.post-stats {
position: relative;
display: inline-block;
padding-left: 20px;
margin-right: 10px;
margin-top: 5px;
}
.post-stats .icon {
position: absolute;
width: 15px;
height: 15px;
}
.icon-tags {
left: 0px;
background: url(/assets/course14/post-challenge.png) 0px 0px ;
}
.icon-comments {
right: 11px;
background: url(/assets/course14/post-challenge.png) 20px 0px ;
}
.post-text {
width: 165px;
background: #ffffff;
padding: 10px 15px;
border-bottom: 5px solid #bdc3c7;
}
Но в .icon-comments right: 11px; тоже затык.
Ineska
6
Допустим, “негоже”, но вот тут вы сами отступ применили, без моих рекомендаций:
А right для иконки можно и на left заменить.
Каюсь, свойства для .post-stats я подсмотрел. Стыдно! Ну ни в какую ссылки не хотели вставать на место.
Помогло.
Ну вот теперь всё как у всех. Не оригинально, но доволен.
Спасибо Вам.
Ineska
8
А, вот почему…)
Оригинальности в этом задании не будет, к сожалению.