I'm creating a "medical resume" for my family. Basically it'll track and allow for printing our medications, providers, diagnosis, and CPAP supplies. I'm having issues with the printing part. I'm trying to get it to print (portrait) with the line breaks before or after the grid rows
.
My grid layout is as follows:
CSS
:
@media print {
body {
background-color: white;
color: black;
height: 11in;
width: 8.5in;
padding: 0.25in;
margin: 0px;
font-size: 10pt;
}
#print_rx_section {
display: grid;
justify-content: center;
align-content: center;
border: 2px solid black;
border-collapse: collapse;
page-break-after: always; /** HAVE NOT TESTED THIS YET, BUT I'M NOT WORRIED ABOUT IT **/
}
#print_rx_section {
grid-template-columns: auto auto auto auto auto auto auto;
}
#print_rx_section>div {
display: inline-grid;
align-items: center;
justify-items: center;
border: 1px solid black;
border-collapse: collapse;
padding: 10px;
text-align: center;
}
}
From other posts, I understand that page-break-inside
is not supported by the browsers.
Here's what it currently shows when I test with Ctrl+p:
My question being - is there an efficient way to break the pages only between rows when the data makes it expand beyond 1 page?