MediaWiki:Common.css

From Amberlynn Wiki
Revision as of 13:07, 27 February 2025 by Admin (talk | contribs)
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
.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 */
}

/* Remove border */
.welcome-table td {
    border: none;
}

/* 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;
    }
}