Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7850647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:55:44+00:00 2026-06-02T18:55:44+00:00

I am iterating over a list of objects. With each iteration I build and

  • 0

I am iterating over a list of objects. With each iteration I build and populate a table which contains the content of a single page.

I am using CSS to add a page break after each table.

table { page-break-after: always; }

This works great, except that I am always getting a blank last page. Which I assume is due to the last table iteration applying a page break.

I have tried.

table { page-break-after: always; }
table { page-break-after: auto; }
table { page-break-after: left; }
table { page-break-after: right; }

However, I always get that blank last page.

Is there another method of inserting page breaks that would not create the blank last page?
Or maybe some way to detect if is the last iteration and not insert the last page break?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T18:55:46+00:00Added an answer on June 2, 2026 at 6:55 pm

    You could add this:

    table:last-of-type {
        page-break-after: auto
    }
    

    Or maybe

    body > *:last-child {
        page-break-after: auto
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm iterating over a JRE Collection which enforces the fail-fast iterator concept, and thus
I want avoid iterating over a nil array. My bad solution: if nil!=myArr myArr.each
I need a function, which is capable of iterating over the collection, calling a
I have a class (foo) that contains a vector. If i try iterating over
I have a list of objects, each with a bool ShouldRun() method on them.
I have a List of objects and I'd like to loop over that list
I am running into this weird issue where I am iterating over a list
I try to iterate over each item in the list. But iterator does not
I've got a list of objects (probably not more than 100), where each object
I am getting a UserList by following List<User> UserList=usersService.findUsers(); than am iterating over this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.