W3C home > Mailing lists > Public > www-style@w3.org > December 2008

Re: Adjusting float height on paged media

From: Håkon Wium Lie <howcome@opera.com>
Date: Mon, 22 Dec 2008 14:50:48 +0100
Message-ID: <18767.39736.365602.534710@opera.com>
To: Henri Sivonen <hsivonen@iki.fi>
Cc: W3C Style List <www-style@w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:18 GMT