Re: Adjusting float height on paged media

Also sprach Henri Sivonen:

 > Problem:
 > When using floats on paged media, if the floats are rather tall  
 > relative to the page height get moved to the next page too easily and  
 > leave a lot of unused space on the page from which they get moved  
 > forward.

Yes, this is a problem. 

The editor's draft of GCPM [1] proposes a solution to the problem by
introducing a comma-separated list of values on float. For example:

  .figure { 
    float: none, top next page;
  }

The first value ("none") means that figures are not floated. However,
I a figure will not fit on the current page, the next value in the
comma-separated list is used instead. So, if there isn't room for the
figure on the current page, it will be floated to the top of the next
page.

[1] http://dev.w3.org/csswg/css3-gcpm/#page-floats

When the figure is floated to the next page, it allows the original
page to continue to be filled, thereby avoiding unused space.

Your suggestiong of allowing cropping and scaling are also
interesting. However, you will still be left with the problem of what
to do when cropping/scaling doesn't yield enough -- you don't want to
scale figures down to unreadable sizes.

Possibly, croppring/scaling could be combined with the above solution.

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Monday, 22 December 2008 13:51:59 UTC