Hallo zusammen,
ich bin neu hier im Forum und habe eine ganz spezielle Frage.
Gibt es eine Möglichkeit Tabellen undterschiedlich zu formatieren?
Um etwas genauer zu werden, hier die Aufgabenstellung:
Es handelt sich um eine HP welche mit Joomla PHP arbeitet und eigentlich alle Einstelungen im CSS der PHP-Seite bereits vorhanden sind.
Jetzt möchte ich in einem Beitrag eine temporäre Formatierung für eine Tabelle verwenden.
Grundsätzlich ist der CSS-Code fertig und sieht wie folgt an:
table {
border-collapse: separate;
border-spacing: 0.2em;
margin-left: 2em;
box-shadow: 0 0 0.1em #666;
position: relative;
z-index: 1;
cursor: context-menu;
}
th,
td {
padding: 0.2em 0.5em;
border-radius: 0.1em;
}
thead th {
background-image: linear-gradient(to top, red 10%, blue );
color: white;
}
td {
font-style: italic;
text-align: right;
box-shadow: inset 1px 3px 5px -3px rgba(0, 0, 0, 0.5);
}
tbody tr:nth-child(even) {
background-color: #e4ebf2;
color: #000;
}
td:empty {
box-shadow: none;
background-color: none;
}
th[scope=row] {
color: #c32e04;
text-align: right;
background-color: #fff;
}
caption {
color: white;
background: #c32e04;
font-size: 1.5em;
box-shadow: 0.1em 0.1em 0.1em 0 hsl(0, 0%, 50%);
padding: 0.2em 0.2em 0.2em 2em;
width: 10em;
margin-left: -.6em;
position: relative;
}
caption::before {
content: "";
position: absolute;
display: block;
height: 0;
width: 0;
top: 1em;
left: -0.6em;
border-style: solid;
border-width: 0.6em;
border-color: transparent hsl(13, 96%, 35%) transparent transparent;
z-index: -1;
}
tbody tr:hover,
tfoot tr:hover {
background-color: #fC6;
}
tbody td:hover,
tfoot td:hover {
background-color: #f90;
}
Alles anzeigen
Problem hierbei ist, dass alle Tabelle die beim Aufruf des Beitrages mit geladen werden im selben Format erscheinen.
Gibt es eine Möglichkeit die Formatierung der Tabelle so zu ändern, dass die Standard - Formatierung nicht verändert wird?
Für Unterstützung jeglicher Art bin ich sehr Dankbar.