| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- @media
- only screen
- and (min-device-width: 500px) {
- .termine-table {
- width: 66.666%;
- th {
- @include geologica-font(normal,600);
- width: 50%;
- &:nth-of-type(1){
- text-align: right;
- padding-right: 2em;
- }
- &:nth-of-type(2){
- text-align: left;
- padding-left: 2em;
- }
- }
- tbody {
- tr {
- &:nth-child(odd) {
- background: #ccc;
- }
- td:nth-of-type(1) {
- text-align: right;
- padding-right: 2em;
- }
- td:nth-of-type(2){
- text-align: left;
- padding-left: 2em;
- }
- }
- }
- }
- }
- @media
- only screen
- and (max-width: 420px), (min-device-width: 428px)
- and (max-device-width: 500px) {
- /* Force table to not be like tables anymore */
- table, thead, tbody, th, td, tr {
- display: block;
- }
- /* Hide table headers (but not display: none;, for accessibility) */
- thead tr {
- position: absolute;
- top: -9999px;
- left: -9999px;
- }
- tr {
- margin: 0 0 1rem 0;
- }
-
- tr:nth-child(odd) {
- background: #ccc;
- }
- td {
- /* Behave like a "row" */
- border: none;
- border-bottom: 1px solid #eee;
- position: relative;
- padding-left: 50%;
- }
- td:before {
- /* Now like a table header */
- position: absolute;
- /* Top/left values mimic padding */
- top: 0;
- left: 6px;
- width: 45%;
- padding-right: 10px;
- white-space: nowrap;
- }
- /*
- Label the data
- You could also use a data-* attribute and content for this. That way "bloats" the HTML, this way means you need to keep HTML and CSS in sync. Lea Verou has a clever way to handle with text-shadow.
- */
- td:nth-of-type(1):before { content: "Datum: "; }
- td:nth-of-type(2):before { content: "Beschreibung: "; }
- }
|