MediaWiki:Common.css: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
} | } | ||
/* | /* Table styling */ | ||
table | .welcome-table { | ||
width: 100%; | |||
background: #f5f5f5; /* Very light grey, moved from outer table */ | |||
margin-top: 1.2em; /* Moved from outer table */ | |||
border: 1px solid #ccc; /* Moved from outer table */ | |||
border-collapse: collapse; | border-collapse: collapse; | ||
} | } | ||
/* | /* Inner table styling (no longer needed, as there's no nested table) */ | ||
/* Text column */ | |||
padding: 0 !important; /* | .welcome-table td { | ||
margin: 0 !important; /* | padding: 0 !important; /* No padding for text cells */ | ||
line-height: 1 !important; /* | margin: 0 !important; /* No margins */ | ||
line-height: 1 !important; /* Tight line spacing */ | |||
vertical-align: top; | |||
} | } | ||
/* Image | /* Image column */ | ||
.welcome-table td[style*="width:30%"] { | |||
vertical-align: middle; /* Center | vertical-align: middle; /* Center image vertically */ | ||
padding-right: 2%; /* Match your original image padding */ | |||
padding-top: 1%; | |||
padding-bottom: 1%; | |||
} | } | ||
/* Image styling */ | /* Image styling */ | ||
.welcome-table td[style*="width:30%"] img { | |||
width: 100%; | width: 100%; | ||
height: auto; | height: auto; | ||
| Line 44: | Line 38: | ||
/* Mobile responsiveness */ | /* Mobile responsiveness */ | ||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.welcome-table, | |||
.welcome-table tr, | |||
.welcome-table td { | |||
display: block !important; | display: block !important; | ||
width: 100% !important; | width: 100% !important; | ||
} | } | ||
.welcome-table td[style*="width:30%"] { | |||
display: block !important; | display: block !important; | ||
width: 100% !important; | width: 100% !important; | ||
vertical-align: top; /* | vertical-align: top; /* Stack image on top on mobile */ | ||
padding-right: 2%; | padding-right: 2%; | ||
padding-top: 1%; | padding-top: 1%; | ||
padding-bottom: 1%; | padding-bottom: 1%; | ||
} | } | ||
.welcome-table td[style*="width:30%"] img { | |||
width: 100%; | width: 100%; | ||
height: auto; | height: auto; | ||
Revision as of 13:01, 25 March 2025
body.page-Main_Page h1.firstHeading {
display: none;
}
/* Table styling */
.welcome-table {
width: 100%;
background: #f5f5f5; /* Very light grey, moved from outer table */
margin-top: 1.2em; /* Moved from outer table */
border: 1px solid #ccc; /* Moved from outer table */
border-collapse: collapse;
}
/* Inner table styling (no longer needed, as there's no nested table) */
/* Text column */
.welcome-table td {
padding: 0 !important; /* No padding for text cells */
margin: 0 !important; /* No margins */
line-height: 1 !important; /* Tight line spacing */
vertical-align: top;
}
/* Image column */
.welcome-table td[style*="width:30%"] {
vertical-align: middle; /* Center image vertically */
padding-right: 2%; /* Match your original image padding */
padding-top: 1%;
padding-bottom: 1%;
}
/* Image styling */
.welcome-table td[style*="width:30%"] img {
width: 100%;
height: auto;
max-width: 100%;
}
/* Mobile responsiveness */
@media (max-width: 768px) {
.welcome-table,
.welcome-table tr,
.welcome-table td {
display: block !important;
width: 100% !important;
}
.welcome-table td[style*="width:30%"] {
display: block !important;
width: 100% !important;
vertical-align: top; /* Stack image on top on mobile */
padding-right: 2%;
padding-top: 1%;
padding-bottom: 1%;
}
.welcome-table td[style*="width:30%"] img {
width: 100%;
height: auto;
}
}
.eras-table {
margin: 1em 0; /* From wikitable */
background-color: #f8f9fa; /* From wikitable */
border: 1px solid #808080; /* Your eras-table, overrides wikitable’s #a2a9b1 */
border-collapse: collapse; /* From wikitable */
color: #000; /* From wikitable */
width: 100%; /* Your eras-table */
table-layout: fixed; /* Your eras-table */
}
.eras-table th {
background-color: #eecdf2; /* Your eras-table, overrides wikitable’s #eaecf0 */
border: 1px solid #a2a9b1; /* From wikitable */
padding: 0.2em 0.4em; /* From wikitable */
text-align: center; /* Both wikitable and eras-table */
font-weight: bold; /* From wikitable */
width: 100%; /* Your eras-table */
display: table-cell; /* Your eras-table */
font-size: 115%;
}
.eras-table td {
background-color: #fdf4ff; /* Your eras-table, overrides wikitable’s default */
border: 1px solid #a2a9b1; /* From wikitable */
padding: 10px; /* Your eras-table, overrides wikitable’s 0.2em 0.4em */
vertical-align: top; /* Your eras-table */
text-align: center; /* Your eras-table, overrides wikitable’s default */
}
/* 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 */
}
@media screen and (max-width: 800px) {
.eras-table {
display: block; /* Switch to block for responsive layout */
margin: 1em 0; /* From wikitable, consistent in media query */
border-collapse: collapse; /* From wikitable, maintain table integrity */
}
.eras-table thead {
display: block; /* Ensure header stays separate */
}
.eras-table th {
display: block; /* Full width block for header */
width: 100%; /* Explicitly full width */
text-align: center; /* Maintain centering */
}
.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; /* Your eras-table padding */
}
}