Попытка создать для отдельных таблиц на странице: Kompiuterių nuomaДве отдельные реагирующие таблицы в странице
Первый стол на телефон выглядит просто отлично, однако, второй один использует те же метки, как и в первой. Как это сделать?
CSS:
table {
width: 100%;
border-collapse: collapse;
}
tr:nth-of-type(odd) {
background: #eee;
}
th {
background: #fbfbfb;
color: black;
font-weight: bold;
}
td,
th {
padding: 6px;
border: 1px solid #ccc;
text-align: left;
}
*/@media only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px) {
table,
thead,
tbody,
th,
td,
tr {
display: block;
}
thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
tr {
border: 1px solid #ccc;
}
td {
border: none;
border-bottom: 1px solid #eee;
position: relative;
padding-left: 50%;
}
td:before {
position: absolute;
top: 6px;
left: 6px;
width: 45%;
padding-right: 10px;
white-space: nowrap;
}
td:nth-of-type(1):before {
content: "";
}
td:nth-of-type(2):before {
content: "MSO 365 Business";
}
td:nth-of-type(3):before {
content: "ESET Endpoint AV";
}
td:nth-of-type(4):before {
content: "ESET Endpoint SEC";
}
td:nth-of-type(5):before {
content: "Krepšys";
}
td:nth-of-type(6):before {
content: "Klaviatūra?";
}
td:nth-of-type(7):before {
content: "Laidinė pelė";
}
td:nth-of-type(8):before {
content: "Bevielė pelė";
}
td:nth-of-type(9):before {
content: "USB Dock";
}
td:nth-of-type(10):before {
content: "Basic Dock";
}
td:nth-of-type(11):before {
content: "Pro Dock";
}
td:nth-of-type(12):before {
content: "Kaina";
}
}
Не уверен, что проблема здесь. Можете ли вы создать макет того, что вы хотите получить? –
Вот скриншот - http://prntscr.com/91ir4i Все в порядке с первой таблицей. Однако второй показывает все, начиная с начала nth-of-type. Нужно, чтобы он продолжался с первой таблицы. Или как заставить его использовать другие слова? – Forrar