MediaWiki:Mobile.css: Difference between revisions

From PoliticalSG
(Created page with "→‎All CSS here will be loaded for users of the mobile site: →‎Infobox Container: .infobox-container { width: 100%; max-width: 350px; →‎Adjust max width: margin: 0 auto; float: none; →‎Prevent float issues: clear: both; } →‎Infobox Table: .infobox-table { width: 100%; border-collapse: collapse; text-align: left; } →‎Image: .infobox-image { text-align: center; padding: 5px; } →‎Headers: .infobox-header, .infob...")
 
No edit summary
 
Line 1: Line 1:
/* All CSS here will be loaded for users of the mobile site */
/* All CSS here will be loaded for users of the mobile site */
/* Infobox Container */
/* Make Infobox Full Width on Mobile */
.infobox-container {
    width: 100%;
    max-width: 350px; /* Adjust max width */
    margin: 0 auto;
    float: none; /* Prevent float issues */
    clear: both;
}
 
/* Infobox Table */
.infobox-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
 
/* Image */
.infobox-image {
    text-align: center;
    padding: 5px;
}
 
/* Headers */
.infobox-header, .infobox-section {
    background-color: #f2f2f2;
    font-weight: bold;
    text-align: center;
}
 
/* Fields */
.infobox-field {
    font-weight: bold;
    width: 35%;
}
 
/* Responsive Fix */
@media screen and (max-width: 600px) {
@media screen and (max-width: 600px) {
     .infobox-container {
     .infobox-container {
         max-width: 100%; /* Full width on mobile */
        width: 100%;  /* Full width */
         max-width: 100%;
        float: none;  /* No float on mobile */
        margin: 0 auto;
        clear: both;
     }
     }



Latest revision as of 03:28, 12 February 2025

/* All CSS here will be loaded for users of the mobile site */
/* Make Infobox Full Width on Mobile */
@media screen and (max-width: 600px) {
    .infobox-container {
        width: 100%;  /* Full width */
        max-width: 100%;
        float: none;  /* No float on mobile */
        margin: 0 auto;
        clear: both;
    }

    .infobox-table {
        font-size: 14px;
    }

    .infobox-image img {
        max-width: 100%;
        height: auto;
    }
}