body { line-height:1.4; margin-top:0; margin-left:0; margin-right:0; //width:650px; width:100%; display: grid; grid-template-columns: 1 / -1; justify-items: center; justify-content:center; } .worksheet { } .row { display: grid; //grid-template-columns: repeat(1000, 1.5em); } .worksheet > div:nth-child(2n) { margin-bottom:.5em; } .cell { display: grid; place-content: center; position: relative; box-shadow:0 0 0 1px #AAA; background-color:white; min-height:1cm; font-size: 20pt; padding-left:0; padding-right:0; margin-left:0; margin-right:0; } .cell-space { box-shadow:0 0 0 0 red !important; border-left:1px solid #AAA; } .words { white-space:preserve-spaces; //width:100%; margin-left: 10px; margin-right: 10px; margin-bottom: 1ex; margin-top: 1ex; font-family: monospace; font-variant: small-caps; display: grid; gap: 0px; //justify-items: center; justify-self: center; //background-color:grey; place-content: center; } .words-row { display: grid; break-inside:avoid; grid-template-columns: 6cm 11cm; } .words-cell { display: grid; vertical-align:center; position: relative; box-shadow:0 0 0 3px #AAA; background-color:white; min-height:1.5em; margin-left:0; margin-right:0; } .words-cell .worksheets { margin-top:1ex; margin-bottom:1ex; margin-left:1ex; margin-right:1ex; display:flex; flex-direction: row; flex-wrap: wrap; justify-content:space-evenly; align-items:flex-start; align-content:space-around; } .words-cell .worksheets .worksheet:last-child { margin-bottom:0; margin-right:0; } .words-cell .worksheets .worksheet { align-self:flex-start; white-space:preserve-spaces; //width:auto; margin-left: 0; margin-right: 0.5cm; margin-bottom: 1ex; margin-top: 0; font-family: monospace; font-variant: small-caps; display: grid; gap: 0px; //justify-items: center; justify-self: center; //background-color:grey; } .words-cell .worksheets .worksheet > div:nth-child(2n) { margin-bottom:0; } .words-cell-picture { width: fit-content; place-content:center; //block-size:fit-content; //box-sizing: fit-content; //width:auto; //max-height:100%; //background-color:white; } .words-cell-picture img { border:0; place-content:center; vertical-align:center; width: 100%; object-fit: contain; object-position: center center; } .words-cell-french { } .words-cell-english { } .words-cell-mandarin { } .words-cell-mandarin .cell { font-size:30pt; } .words-cell-mandarin .row-input .cell { color:#ddd; } .words-cell-mandarin .row-sound .cell { color:black; font-size:14pt; font-variant:normal; } .words-cell-pinyin { } @media all { @page { size: 210mm 297mm; margin-top: 1cm; margin-bottom: 1cm; margin-left: 2cm; margin-right: 2cm; } } }