MediaWiki:Print.css: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 176: Line 176:
}
}


.article-images {  
.article-images {
     margin: 0 !important;  
     margin: 0 !important;
     padding: 0 !important;  
     padding: 0 !important;
     page-break-inside: avoid;  
     page-break-inside: avoid;
}
}


.article-images .image-container {
.article-images .image-container {
     display: flex;
     display: inline-flex;
     justify-content: flex-end;  /* push image to the right edge */
     flex-direction: column;  /* stack image + caption */
     align-items: flex-start;
     align-items: flex-end;   /* push both to the right side of the page */
     margin: 0 !important;
     margin: 0 !important;
     padding: 0 !important;
     padding: 0 !important;
    gap: 0 !important;
}
}


.article-images .image-container img {
.article-images .image-container img {
     display: block;
     display: block;
     height: 85mm;               /* ← pick your fixed height */
     height: 85mm;             /* fixed height */
     width: auto;                 /* keep aspect ratio */
     width: auto;
     max-width: 100%;
     max-width: 100%;
     margin: 0 !important;
     margin: 0 !important;
     padding: 0 !important;
     padding: 0 !important;
     object-fit: contain;         /* avoids distortion if very tall/wide */
     object-fit: contain;
}
}


/* optional: caption below, right-aligned, same width “column” as the image */
.caption-image1 {
    .caption-image1 {
     margin: 0 !important;     /* no gaps */
     margin: 2mm 0 0 0 !important;
     padding: 0 !important;
     padding: 0 !important;
     font-size: 8pt;
     font-size: 8pt;
     color: #555;
     color: #555;
     text-align: right;
     text-align: left;         /* align text to the left edge of the image */
    /* if you want caption width to match image’s visual column: */
     width: 100%;             /* take the full width of the image container */
     max-width: 85mm;             /* same as the image height column, visually neat */
    margin-left: auto;          /* keep it right aligned */
}
}


Navigation menu