Испытание: анонс поста [18/18] - 100%, но отступы не кратны пяти

Благодарю за помощь) 100%

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 {
    margin-left: 75px;
    position: relative;
}
    
.post-stats .icon {
    width: 15px;
    height: 15px;
    
}

.icon {

    background: url("/assets/course14/post-challenge.png") no-repeat;
}

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

}

.icon-tags {
    position: absolute;
    background-position: 0 0;
    top: 0px;
    left: 0px;
}

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

.post-author a, .post-stats a {
    color: #2980b9;
    text-decoration: none;
}
    
.post-author {
    margin: 5px 0;
}

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


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

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

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

Ineska, убрал у ссылок внутри post-stats inline-block, так как я думал что для ссылок задам паддинги, но для ссылок отступы задавать не нужно действительно. Я использовал для .post-stats
padding-left
margin-right
Получилось 100%, сделано правильно?

.post-stats
padding-left: 20px;
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;
}

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

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

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

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

.post-author {
    margin-top: 5px;
    margin-bottom: 5px;
}

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

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

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

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

.post-stats .icon-tags {
    top: 0;
    left: 0;    
}

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

.post-text {
    background: #ffffff;
    width: 195px;
    height: 123px;
    border-bottom: 5px solid #bdc3c7;
    box-sizing: border-box;
    padding: 10px 15px;
}

Правильно.
Не задавайте высоту блоку .post-text.

1 лайк

Убрал height, спасибо Вам огромное, Вы так добры.