Is there a way to automatically detect when content encroaches upon a page margin and then force a page break with CSS?
and my code is
body {
font: inherit !important;
color: black;
}
.ql-editor *{
font-family: cwTeXKai !important;
}
table {
width: 90%;
border-collapse: collapse;
border: none;
margin-top: 18pt;
border: solid 1pt;
}
td {
border: solid 1pt;
}
p {
font-family: cwTeXKai !important;
display: block;
margin-block-start: .03em;
margin-block-end: .03em;
margin-inline-start: 0px;
margin-inline-end: 0px;
}
span{
font-family: cwTeXKai !important;
}
@page {
size: A4 portrait;
}
I have watching this methods, but it's still not working.
tbody{
page-break-inside:avoid;
page-break-after:auto;
position:relative;
display:block;}
so how can auto draw the break border?