#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    2
    Rep Power
    0

    Page-break-inside


    I have two <div>s. I know I can use page-break-after on the first <div> to force a page break, but I don't want to force a break. I only want to break after the first <div> if the second <div> won't fit on the same printed page as the first <div>.

    I want 0 widows from the first <div> to show up on the next page where the second <div> starts.

    So, if I use

    .break{page-break-inside:avoid;}

    as expected, I get a page break between the first <div> and the second <div>, and I get 2 "widows" on the next page, which I would expect because 2 widows is the default.

    However, so that I don't get any "widows" I try to use

    .break{page-break-inside:avoid; widows:0;}

    but the page break does not occur at all. I've tried setting children:0; widows:0; and various combinations of both, but don't seem to be able to get things to work so that the second <div> starts on the second page and there are no widows from the first <div>.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    2
    Rep Power
    0

    Solved


    Working as expected. Just hadn't refreshed browser. (duh)

IMN logo majestic logo threadwatch logo seochat tools logo