What am I doing wrong in my CSS? I do not want page break after h1. Thanks.
CSS
h1, h2, h3, h4 {
hyphens: auto;
page-break-after:avoid;
color: #221f20;
font-variant: small-caps;
font-family: 'Garamond Premier Pro', Arial;
padding: 0;
margin-top: 15px;
margin-bottom: 0;
}
h1{
border-top: 4px solid #e6e7e9;
display: inline-block;
}
HTML
<p>Long paragraph</p>
<h1> K-12 Proposition</h1>
<p>Another paragraph</p>
CSS
h1, h2, h3, h4 {
hyphens: auto;
page-break-after:avoid;
color: #221f20;
font-variant: small-caps;
font-family: 'Garamond Premier Pro', Arial;
padding: 0;
margin-top: 15px;
margin-bottom: 0;
}
h1{
border-top: 4px solid #e6e7e9;
display: inline-block;
}
HTML
<p>Long paragraph</p>
<h1> K-12 Proposition</h1>
<p>Another paragraph</p>