body{ margin: 0; display: block; } .page { height: 297mm; width: 210mm; margin: 0 auto; } @page { size: a4; } .card { float: left; width: calc(210mm / 2 - 10mm); /* Adjusted width to fit 2 cards per row with margins */ height: calc(297mm / 4 - 10mm); /* Adjusted height to fit 4 rows per page with margins */ /*border: 1mm solid salmon;*/ margin: 5mm; box-sizing: border-box; /* Includes the border in the width and height calculation */ overflow: hidden; } .card.left-card { padding-right: 10mm; } .card.right-card { padding-left: 10mm; } h1{ font-size: 10pt; font-family: 'Courier New', Courier, monospace; color: #c4007a; padding-left: 5mm; text-align: center; padding-top: 50px; overflow: hidden; } h2{ font-family: Catamaran, sans-serif; font-weight: 800; font-size: 14; color: #393E41; text-decoration: underline; text-decoration-line: underline; text-decoration-thickness: 8px; text-decoration-color: #A6DBF0; } h3 { font-family: Catamaran, sans-serif; font-weight: 800; font-size: 14; color: #393E41; text-decoration: underline; text-decoration-line: underline; text-decoration-thickness: 8px; text-decoration-color: #E2C044; } .info{ font-family: Catamaran, sans-serif; font-weight: 400; font-size: 10; color: #393E41; } .tensteps{ font-family: Catamaran, sans-serif; font-weight: 800; font-size: 12pt; color: #6776FF; } .diary{ font-size: 10pt; font-family:'Fjord', serif; color: #9594c4; padding-right: 5mm; text-align: center; height:fit-content; overflow: hidden; } .howto{ font-family: Catamaran, sans-serif; font-weight: 400; font-size: 10; color: #E2C044; } img { width: 100%;; height: 100%; object-fit: contain; } @media print { * { box-sizing: border-box; } .body{ margin: 0; } @page{ size: a4; margin: 0; } .overflowing-element { overflow: hidden; } } @media screen { .page{ width: auto; height: auto; } .button { background-color: #9594c4; border: none; color: white; padding: 20px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 4px 2px; } #infobutton, .close, button { background: none; display: inline-block; min-width: 50px; height: 50px; border-radius: 24px; padding: 0 4px; border: 1px solid currentColor; color: #9594c4; } #infobutton:hover { border: 1px solid #9594c4; background-color: #9594c4; color: white; } nav { position: absolute; top: 0; left: 0; right: 0; z-index: 50; padding: 24px; text-align: right; pointer-events: none; } }