2010-02-09 09:39:16 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=UTF-8" >
< title > CSS Test: page-break-after: always< / title >
< link rel = "author" href = "mailto:mturnwall@revenution.com" title = "Michael Turnwall" >
< link rel = "author" href = "http://www.hp.com/" title = "Hewlett-Packard Company" >
< link rel = "help" href = "http://www.w3.org/TR/CSS21/page.html#page-break-props" >
< meta content = "paged" name = "flags" >
< meta content = "The 'always' value of the 'page-break-after' property forces a page break after the box." name = "assert" >
< style type = "text/css" >
div.break {
page-break-after:always;
}
< / style >
< script src = "../resources/paged-media-test-utils.js" > < / script >
< script >
2012-06-15 07:38:37 +00:00
if (window.testRunner)
testRunner.dumpAsText();
2010-02-09 09:39:16 +00:00
function test()
{
2010-02-26 10:40:17 +00:00
pageNumberForElementShouldBe('test', 1);
numberOfPagesShouldBe(2);
2010-02-09 09:39:16 +00:00
}
< / script >
< / head >
2010-02-26 10:40:17 +00:00
< body onload = "runPrintingTest(test)" >
2010-02-09 09:39:16 +00:00
< div class = "break" > There must be a page break after this paragraph, followed by another line of content. This test should produce two pages of output.< / div >
< div id = "test" >
This text should be at the top of the second and final page.
< / div >
< / body >
< / html >