Skip to content

Instantly share code, notes, and snippets.

@LeoOnTheEarth
Created April 21, 2016 08:45
Show Gist options
  • Save LeoOnTheEarth/1b8de1507b99557c2e1a5f38f41147aa to your computer and use it in GitHub Desktop.
Save LeoOnTheEarth/1b8de1507b99557c2e1a5f38f41147aa to your computer and use it in GitHub Desktop.
Auto page break with Flex Box Table
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<style>
.table { page-break-inside: auto; }
.row { page-break-inside: avoid; page-break-after: auto; }
.row {
height: 220px;
border: 1px solid black;
margin: 10px;
}
</style>
</head>
<body>
<div class="table">
<div class="row">
<div class="column"></div>
<div class="column"></div>
</div>
<div class="row"></div>
<div class="row"></div>
<div class="row"></div>
<div class="row"></div>
<div class="row"></div>
<div class="row"></div>
<div class="row"></div>
<div class="row"></div>
<div class="row"></div>
<div class="row"></div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment