Вечер добрый!
Написала вроде всё правильно, но при проверке оказывается, что таблица слишком близко к краю и шрифт крупнее нужного. Кажется, я где-то прокосячила капитально.
Спасите-помогите-подскажите.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Испытание: итоговая таблица</title>
<table>
<h1>Итоговая таблица</h1>
<tr>
<th class="pim-1" style="width: 33%;"> Город </th>
<th class="pim-2" style="width: 33%;"> Посещений </th>
<th class="pim-3" style="width: 33%;"> % </th>
</tr>
<tr>
<td class="pim-4">СПб </td>
<td> 199 </td>
<td class="pim-9"> 65.12 </td>
</tr>
<tr>
<td class="pim-5"> Москва </td>
<td class="pim-6"> 69 </td>
<td class="pim-7"> 21.3 </td>
</tr>
<tr>
<td class="pim-8"> Киев </td>
<td> 5 </td>
<td class="pim-9"> 8 </td>
</tr>
<tr>
<td colspan="2" class="pim-5"> Посещений за весь период </td>
<td class="pim-7"> 273 </td>
</tr>
</table>
</body>
</html>
body {
width: 350px;
margin: 0;
padding: 10px
font-size: 14px;
font-family: Arial, sans-serif;
}
table {
border-collapse: collapse;
color: black;
padding: 5px
}
th {
border-top: 1px solid black;
border-bottom: 1px solid black;
color: white;
padding: 10px;
}
td {
border-bottom: 1px solid lightgray;
text-align: center;
padding: 10px;
}
.pim-1 {
background-color: darkcyan;
color: white;
text-align: left;
}
.pim-2 {
background-color: lightblue;
color: white;
text-align: center;
}
.pim-3 {
background-color: darkcyan;
color: white;
text-align: right;
}
.pim-4 {
text-align: left;
}
.pim-5 {
text-align: left;
background-color: lightyellow;
}
.pim-6 {
text-align: center;
background-color: lightyellow;
}
.pim-7 {
text-align: right;
background-color: lightyellow;
}
.pim-8 {
text-align: left;
}
.pim-9 {
text-align: right;
}