Olga Anastasiadou
Olga Anastasiadou

Reputation: 143

page break after certain tables

my problem is : I have a page with several html tables that I want to print. Some tables have many rows, other have not. What I want to do is print the first and the second table (the big ones) in seperate pages and the rest of them (small ones) two per page. How can I put a page-break where I want to? I tried

<style>
@media print
{
table {page-break-after: left}
}
</style>

but this puts a page break after each table, something I do not want.

Anyone can help??? Thanks and regards!

Upvotes: 0

Views: 714

Answers (1)

Pekka
Pekka

Reputation: 449495

I would put the rule into a class, and apply the class to each table.

@media print
 {
   table.break {page-break-after: left}

 }

And HTML:

<table class="break">

Upvotes: 5

Related Questions