MediaWiki:Common.css
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.
/* 1. Table Layout & Spacing */
.mw-parser-output .wikitable {
width: 100% !important;
table-layout: auto !important;
border-collapse: collapse !important;
}
.mw-parser-output .wikitable td,
.mw-parser-output .wikitable th {
padding: 12px 15px !important; /* This fixes the text hitting the edges */
vertical-align: middle !important;
overflow: visible !important;
}
/* 2. Lock the 'Cover' column width */
.mw-parser-output .wikitable td:first-child {
width: 80px !important;
min-width: 80px !important;
text-align: center !important;
}
/* 3. The Container Box */
.mw-parser-output .coverSmall {
display: block !important;
width: 60px !important;
height: 80px !important;
margin: 0 auto;
position: relative !important;
overflow: hidden !important; /* This crops the 300px image until hover */
}
/* 4. THE FIX: Force the 300px image to shrink in Normal View */
.mw-parser-output .coverSmall img.zoom-img {
width: 60px !important;
height: 80px !important;
object-fit: contain !important; /* Fits the whole pamphlet in the box */
display: block !important;
position: static !important;
}
/* 5. The Hover Zoom */
.mw-parser-output .coverThumb:hover .coverSmall {
overflow: visible !important; /* Allows the image to break out */
}
.mw-parser-output .coverThumb:hover .coverSmall img.zoom-img {
position: absolute !important;
top: 0 !important;
left: 0 !important;
width: 400px !important; /* Magnified size */
height: auto !important;
max-width: none !important;
/* Pulls it out and to the right */
transform: translate(100px, -20px) !important;
z-index: 10000 !important;
pointer-events: none !important; /* Flicker protection */
background: #fff;
border: 1px solid #888;
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}