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: 'NotCourierSans', Courier, monospace; color: #c4007a; font-weight: 600; padding-left: 5mm; text-align: center; padding-top: 50px; overflow: hidden; margin: 0mm; margin-bottom: 5pt; line-height: 14pt; } h2{ font-family: 'Catamaran Bold', sans-serif; font-weight: 1000; font-size: 14pt; color: #A6DBF0; margin: 0mm; margin-bottom: 5pt; line-height: 14pt; } h3 { font-family: 'Catamaran Bold', sans-serif; font-weight: 1000; font-size: 14pt; color: #E2C044; margin: 0mm; margin-bottom: 5pt; line-height: 14pt; } h4{ font-size: 8pt; font-family: 'NotCourierSans Bold', Courier, monospace; color: #c4007a; font-weight: 800; padding-left: 5mm; text-align: right; overflow: hidden; margin: 0mm; } p{ margin: 0mm; line-height: 10pt; } .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; line-height: 16pt; } .howto{ font-family: 'Catamaran', sans-serif; font-weight: 400; font-size: 10; color: #E2C044; } .makeanotebook{ font-size: 8pt; font-family: 'NotCourierSans', Courier, monospace; color: #c4007a; font-weight: 800; } .diary{ font-size: 10pt; font-family: 'NotCourierSans', Courier, monospace; font-weight: 800; color: #9594C4; } .questions{ font-family: 'Catamaran', sans-serif; font-weight: 800; font-size: 12pt; color: #6776FF; line-height: 16pt; padding-left: 5mm; text-align: center; padding-top: 50px; } 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; } nav{ display: none !important; } } @media screen { .page{ width: auto; height: auto; } nav { position: absolute; top: 0; left: 0; right: 0; z-index: 50; padding: 24px; text-align: right; } .btn { background: none; display: inline-block; min-width: 50px; height: 50px; border-radius: 24px; padding: 0 4px; border: 1px solid currentColor; color: #9594c4; transition-duration: 0.4s; cursor: pointer; } .btn:hover { background-color: #9594c4; } }