How do I avoid a page break immediately after a heading

前端 未结 3 2043
灰色年华
灰色年华 2021-02-05 01:36

I have an HTML 4.01/CSS 2.1 document that includes an H3 heading followed by a short (one line) paragraph block and then an unordered list with several items:

&l         


        
3条回答
  •  执念已碎
    2021-02-05 02:00

    Since the CSS property page-break-after: avoid doesn't work in any WebKit or Mozilla based browsers, use the page-break-inside: avoid over the heading and an acceptable amount of the text:

    CSS

    
    

    HTML

    Heading!

    Some things:

    • Thing one
    • Thing B
    • Thing 4

提交回复
热议问题