Files
orario/htdocs/css/timetable.css

221 lines
3.2 KiB
CSS

body {
font-family: Arial, sans-serif;
padding: 15px;
background-color: #f0f2f5;
color: #333;
margin: 0;
}
h1 {
text-align: center;
margin-bottom: 20px;
color: #2c3e50;
font-size: 1.8em;
}
/* Table styles */
table {
border-collapse: collapse;
width: 100%;
max-width: 1000px;
margin: 0 auto;
background: #fff;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
th, td {
border: 1px solid #ccc;
text-align: center;
padding: 10px;
vertical-align: top;
}
th {
background-color: #e0e0e0;
font-weight: bold;
}
td {
transition: background-color 0.2s;
}
td:hover {
background-color: #f7f7f7;
}
.subject {
font-weight: bold;
color: #1f618d;
}
.teacher {
font-size: 0.9em;
color: #2c3e50;
}
.room {
font-size: 0.8em;
color: #666;
}
/*
@media (max-width: 768px) {
table, thead, tbody, th, td, tr {
display: block;
width: 100%;
}
tr {
margin-bottom: 15px;
border-bottom: 2px solid #ddd;
padding-bottom: 10px;
}
th {
display: none;
}
td {
text-align: left;
padding: 10px 10px 10px 45%;
position: relative;
border: none;
border-bottom: 1px solid #eee;
}
td::before {
position: absolute;
left: 10px;
top: 10px;
width: 40%;
white-space: nowrap;
font-weight: bold;
content: attr(data-label);
}
td:last-child {
border-bottom: 0;
}
}
@media (max-width: 480px) {
body { padding: 10px; }
h1 { font-size: 1.5em; }
td::before { font-size: 0.9em; }
td { padding-left: 50%; }
}
*/
/* --- tuoi stili desktop (questi restano uguali) --- */
table {
border-collapse: collapse;
width: 100%;
max-width: 1000px;
margin: 0 auto;
background: #fff;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
th, td {
border: 1px solid #ccc;
text-align: center;
padding: 10px;
vertical-align: top;
}
th {
background-color: #e0e0e0;
font-weight: bold;
}
td {
transition: background-color 0.2s;
}
td:hover {
background-color: #f7f7f7;
}
.subject {
font-weight: bold;
color: #1f618d;
}
.teacher {
font-size: 0.9em;
color: #2c3e50;
}
.room {
font-size: 0.8em;
color: #666;
}
/* --- qui sostituisci con la versione migliorata --- */
@media (max-width: 768px) {
table {
box-shadow: none;
border-radius: 0;
}
tr {
margin-bottom: 20px;
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 6px rgba(0,0,0,0.08);
overflow: hidden;
padding: 10px;
}
td {
padding: 8px 8px 8px 50%;
border: none;
border-bottom: 1px solid #eee;
font-size: 0.9em;
}
td::before {
position: absolute;
top: 10px;
left: 10px;
color: #1f618d;
font-size: 0.85em;
text-transform: uppercase;
letter-spacing: 0.5px;
content: attr(data-label);
}
td > .subject {
font-weight: 600;
font-size: 1em;
margin-bottom: 2px;
}
td > .teacher {
font-size: 0.85em;
color: #555;
}
td > .room {
font-size: 0.75em;
color: #888;
}
td:last-child {
border-bottom: none;
}
}
@media (max-width: 480px) {
td {
padding-left: 45%;
}
td::before {
width: 40%;
font-size: 0.8em;
}
}