Jump to content

MediaWiki:Common.css

From IITD Wiki
Revision as of 10:04, 14 April 2026 by Maintenance script (talk | contribs) (Fix hero image CSS specificity)

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.
/* Constrain external images in article content to a reasonable size */
.mw-parser-output img:not(.mw-file-element) {
    max-width: 200px;
    max-height: 250px;
    width: auto;
    height: auto;
}

/* Hero banner image on Main Page - override the constraint above */
.mw-parser-output .cs-hero-banner img {
    max-width: 100% !important;
    max-height: 350px !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.cs-hero-banner {
    text-align: center;
    margin-bottom: 1em;
    overflow: hidden;
    border-radius: 6px;
}