Do the style-reset html body margin padding body width 280px min-heigh

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
/* Do the style-reset */
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 {
padding-left: 75px;
position: relative;
}
.post-stats .icon{
width: 15px;
height: 15px;
}
.icon-tags {
background: url('http://htmlacademy.ru/assets/course14/post-challenge.png') no-repeat 0 0;
}
.icon-comments {
background: url('http://htmlacademy.ru/assets/course14/post-challenge.png') no-repeat -20px 0;
}
.post-title {
font-size: 20px;
color: #2980b9;
margin-bottom: 5px;
}
.post-date {
position: absolute;
top: 0;
left: 0;
background: #ffffff;
display: block;
width: 55px;
height: 55px;
line-height: 55px;
text-align: center;
font-weight: bold;
font-size: 15px;
border-bottom: 5px solid #bdc3c7;
}
.post-type {
position: absolute;
top: 70px;
left: 0;
background: #7f8c8d url('http://htmlacademy.ru/assets/course14/quotes.png') no-repeat 50% 50%;
display: block;
width: 55px;
height: 55px;
border-bottom: 5px solid #bdc3c7;
}
.post-author {
margin-bottom: 5px;
}
a {
text-decoration: none;
color: #2980b9;
}
/* Do .post-stats inline-block, do relative position, set the margin-left of the inner 20 to insert into the gap icons with the absolutly position */
.post-stats {
display: inline-block;
position: relative;
padding-left: 20px;
/* not to forget to add a margin-right: 10px to front icon-comment was indented */
margin-right: 10px;
margin-bottom: 20px;
}
.icon {
position: absolute;
top: 0;
left: 0;
}
.post-text {
background: #ffffff;
padding: 10px 25px 10px 15px;
border-bottom: 5px solid #bdc3c7;
}