Испытание: анонс поста [18/18] 99% ПОЧЕМУ???

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;
width: 280px;
padding-left: 75px;
}

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

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

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

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

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

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

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

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

Могли бы и сами на вкладку “Различия” посмотреть. Или хоть вставить код правильно. (уж очень надоело каждый раз править кавычки вручную).
Картинка в спрайте не меняется у вас. Причина в недостаточном уровне специфичности селектора. Теория из курса “Наследование и каскадирование” ожидает вашего пересмотра.

.post-stats .icon-comments ???

font-family: “Arial”, sans-serif;  

Эти кавычки надоели?

По-моему, эти кавычки ставятся в случаях, когда название состоит как минимум из двух слов?

Здесь речь о другом.
Если код скопировать в форуме и вставить в редактор кода в курсах (или в любой другой редактор) – кавычки шрифта приходится менять вручную.

 font-family: “Arial”, sans-serif;  
 background: #7f8c8d url("/assets/course14/quotes.png") no-repeat 50%;

В шрифте кавычки неправильные, а свойствах фона правильные.

1 лайк

Да, такие. А еще в псевдораспорках в свойстве content бывает.

1 лайк

Спасибо, не знал, буду внимательнее.