MediaWiki:Common.css: Difference between revisions

From Amberlynn Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Ensure only this table is affected */
.welcome-table {
.eras-table {
    background-color: #f5f5f5;    /* Very light grey background */
     display: flex;
    border: 1px solid #808080;    /* Solid grey border */
     flex-wrap: wrap;
    border-collapse: collapse;
}
 
/* Center content in table cells */
.welcome-table td {
    vertical-align: top;
    text-align: center; /* Center the text under the image */
    padding: 8px; /* Add some padding for spacing */
}
 
.welcome-table th {
     padding-top: 8px;         /* Increased padding on top for header cells */
}
 
/* Ensure images scale properly */
.eras-table img {
     max-width: 200px;
     width: 100%;
     width: 100%;
    height: auto;
    display: block; /* Ensure image behaves as a block for centering */
    margin: 0 auto; /* Center the image horizontally */
}
}


/* Style individual cells */
/* Base table styling */
.eras-table td {
.eras-table {
     flex: 1 1 16.66%; /* 6 columns: ~1/6th width each */
     border-collapse: collapse;
    box-sizing: border-box;
     width: 100%;
     text-align: center; /* Keeps images and text centered */
     table-layout: fixed; /* Helps maintain column widths */
     min-width: 0; /* Prevents overflow issues */
}
}


/* Header spans full width always */
/* Ensure header spans all columns */
.eras-table th {
.eras-table th {
     flex: 1 1 100%;
     width: 100%;
    display: table-cell; /* Keep table behavior for spanning */
    text-align: center; /* Center the title text */
}
}


/* Uniform image height */
/* Center content in table cells */
.eras-table td img {
.eras-table td {
     height: 200px; /* Fixed height for all images */
     vertical-align: top;
    width: auto; /* Maintains aspect ratio */
     text-align: center; /* Center the text under the image */
     max-width: 100%; /* Ensures images don’t overflow cell */
     padding: 10px; /* Add some padding for spacing */
     display: block; /* Removes unwanted spacing */
    margin: 0 auto; /* Centers images */
}
}


/* Medium resolution/zoom: 3 columns, 2 rows */
/* Medium screens and below - switch to 3x2 layout for content */
@media (max-width: 800px) {
@media screen and (max-width: 800px) {
     .eras-table td {
     .eras-table {
         flex: 1 1 33.33%; /* 3 columns: ~1/3rd width each */
         display: block; /* Switch to block for responsive layout */
    }
    .eras-table thead {
        display: block; /* Ensure header stays separate */
    }
    .eras-table th {
        display: block; /* Full width block for header */
        width: 100%; /* Explicitly full width */
    }
    .eras-table tbody {
        display: flex;
        flex-wrap: wrap;
     }
     }
     .eras-table td img {
     .eras-table tr {
         height: 150px; /* Slightly smaller for medium screens */
         display: contents; /* Let cells flow into flex */
     }
     }
}
/* Small resolution/max zoom: 1 column, 6 rows */
@media (max-width: 400px) {
     .eras-table td {
     .eras-table td {
         flex: 1 1 100%; /* 1 column: full width */
         flex: 0 0 33.333%; /* 3 columns */
    }
        box-sizing: border-box;
    .eras-table td img {
         text-align: center; /* Ensure text stays centered in flex layout */
         height: 100px; /* Smaller for single-column view */
        padding: 10px;
     }
     }
}
}

Latest revision as of 13:08, 27 February 2025

.welcome-table {
    background-color: #f5f5f5;    /* Very light grey background */
    border: 1px solid #808080;    /* Solid grey border */
    border-collapse: collapse;
}

/* Center content in table cells */
.welcome-table td {
    vertical-align: top;
    text-align: center; /* Center the text under the image */
    padding: 8px; /* Add some padding for spacing */
}

.welcome-table th {
    padding-top: 8px;          /* Increased padding on top for header cells */
}

/* Ensure images scale properly */
.eras-table img {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block; /* Ensure image behaves as a block for centering */
    margin: 0 auto; /* Center the image horizontally */
}

/* Base table styling */
.eras-table {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed; /* Helps maintain column widths */
}

/* Ensure header spans all columns */
.eras-table th {
    width: 100%;
    display: table-cell; /* Keep table behavior for spanning */
    text-align: center; /* Center the title text */
}

/* Center content in table cells */
.eras-table td {
    vertical-align: top;
    text-align: center; /* Center the text under the image */
    padding: 10px; /* Add some padding for spacing */
}

/* Medium screens and below - switch to 3x2 layout for content */
@media screen and (max-width: 800px) {
    .eras-table {
        display: block; /* Switch to block for responsive layout */
    }
    .eras-table thead {
        display: block; /* Ensure header stays separate */
    }
    .eras-table th {
        display: block; /* Full width block for header */
        width: 100%; /* Explicitly full width */
    }
    .eras-table tbody {
        display: flex;
        flex-wrap: wrap;
    }
    .eras-table tr {
        display: contents; /* Let cells flow into flex */
    }
    .eras-table td {
        flex: 0 0 33.333%; /* 3 columns */
        box-sizing: border-box;
        text-align: center; /* Ensure text stays centered in flex layout */
        padding: 10px;
    }
}