MediaWiki:Mobile.css

From ChimniWiki
Revision as of 16:06, 6 June 2025 by Nigel17 (talk | contribs) (Created page with "→‎All CSS here will be loaded for users of the mobile site: →‎Make images with class "full-width" behave responsively on mobile: img.full-width { width: 100% !important; height: auto !important; float: none !important; display: block; margin: 0 auto 1em auto; } →‎Hide elements with the "nomobile" class on mobile: .nomobile { display: none !important; } →‎Show elements only on mobile with "mobileonly" class: .mobileonly { display...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* All CSS here will be loaded for users of the mobile site */

/* Make images with class "full-width" behave responsively on mobile */
img.full-width {
    width: 100% !important;
    height: auto !important;
    float: none !important;
    display: block;
    margin: 0 auto 1em auto;
}

/* Hide elements with the "nomobile" class on mobile */
.nomobile {
    display: none !important;
}

/* Show elements only on mobile with "mobileonly" class */
.mobileonly {
    display: block;
}

@media (min-width: 720px) {
    .mobileonly {
        display: none !important;
    }
}