-
Notifications
You must be signed in to change notification settings - Fork 791
Expand file tree
/
Copy path#Overview.src.html#
More file actions
1426 lines (1037 loc) · 35 KB
/
#Overview.src.html#
File metadata and controls
1426 lines (1037 loc) · 35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>CSS Page Floats</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../default.css">
<link href="http://www.w3.org/StyleSheets/TR/W3C-[STATUS].css" rel=stylesheet type="text/css">
<style type="text/css">
.example img { display: block }
.example { background: #ddd }
body { line-height: 1.3 }
.remove, .unimplemented { display: none }
table.string-set-example { font-family: monospace; border-collapse: collapse }
table.string-set-example div.pre {
width: 12em; white-space: pre;
}
table.string-set-example td {
padding: 0.3em;
border: thin solid black
}
</style>
<body>
<div class="head">
<!--logo-->
<h1>CSS Page Floats</h1>
<h2 class="no-num no-toc" id="w3c-working">[LONGSTATUS] [DATE]</h2>
<dl>
<dt>This version:</dt>
<dd><a href="[VERSION]">http://www.w3.org/TR/[YEAR]/[STATUS]-css3-gcpm-[CDATE]/</a></dd>
<dt>Latest version:
<dd><a href="http://www.w3.org/TR/css3-gcpm/">http://www.w3.org/TR/css-page-floats/</a>
<!--
<dt>Previous version:
<dd><a href="http://www.w3.org/TR/2010/WD-css-page-floats/">
http://www.w3.org/TR/2010/WD-css-page-floats/</a>
-->
<dt>Feedback:</dt>
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-gcpm%5D%20feedback">www-style@w3.org</a> with subject line “<kbd>[css-page-floats] <var>… message topic …</var></kbd>” (<a rel="discussion" href="http://lists.w3.org/Archives/Public/www-style/">archives</a>)
<dt>Editor:
<dd>Håkon Wium Lie, Opera Software, howcome@opera.com
</dl>
<!--copyright-->
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc" id=abstract>Abstract</h2>
<p>This module describes features often used in printed publications. Figures and photos are often moved to the top or bottom of columns and pages, along with their captions. Some elements (e.g., call-outs) push aside other content in the flow of text, and sometimes one column is given a different styling than others. This draft describes how to achieve these effects, both on paper and screens.
<h2 class="no-num no-toc">Status of this document</h2>
<!--begin-status-->
<!--end-status-->
<p>This WD contains functionality that the CSS WG finds interesting and useful. The described functionality used to be part of the [[GCPM]] draft
<h2 class="no-num no-toc"><a name="contents">Table of contents</a></h2>
<!--begin-toc-->
<p>[If you keep the <!--comment--> the table of contents will be
included here automatically.]</p>
<!--end-toc-->
<h2 class="no-num">Introduction</h2>
<p>(This section is not normative.)
<p>This specification describes features often used in printed
publications.
<h2>Page floats</h2>
<p>In page-based layouts, images and figures are often displayed at
the top or bottom of pages. This specificaton adds new keywords on the
'float' property to create <em>page floats</em>. A page float can
float inside its natural column/page, or its placement can be deferred
to a following column/page with the <em>float-defer</em> properties.
Page floats can be set to span several columns, thereby supporting
commonly used newspaper layouts. New values on the 'clear' property
adds further ways of refining layouts with page floats.
<p class=note>Not all multicol elements are constrained by the page
box. Therefore, a more accurate term for page floats may be <em>column
floats</em> as all of them are constrained by the column box. However,
in most cases, page floats seems like a better term.
<h3>Floating to the top/bottom: top, bottom, snap</h3>
<p>These new keywords on 'float' have been added:
<dl>
<dt>top
<dd>The float is floated to the top of the column
<dt>bottom
<dd>The float is floated to the bottom of the column
<!--
<dt>top-corner
<dd>the box is floated to the top of the last column (in the inline direction) that fits inside the multicol element on the same page.
<dt>bottom-corner
<dd>similar to 'top-corner', exept the box is floated to the bottom
-->
<dt>snap(<length> <length>? [, top | bottom | near ]?)
<dd><p>Makes the element float to the top or bottom if it naturally appears within a certain distance from the top or bottom. The length value(s) specifies the maxium distance from the top/bottom that an element must be within in order to be floated; one length value specifies the distance from both the top and the bottom, two length values specify the distance from the top and bottom, respectively.
<p>The optional keyword value specifies where the element is floated: top, bottom, or the nearest of the two. The initial value is 'near'. If 'near' is in effect and the element is within the specified distance both from the top and the bottom, bottom wins.
<p>An element is considered to be a float if it has a snap() value, even if the element does not appear within the specified distance. This way, it can be determined whether an element is float or not without laying out the document.
<dt>snap
<dd>same as <tt>snap(2em, near)</tt>
</dl>
<p>These new keywords only apply in paged media; in continous media
declarations with these keywords are ignored.
<p>Elements with any of these new keywords are called 'page floats'.
Each page float has a <em>natural column</em>, which is the column
where the element would have started to appears it it was not a float.
Also, each page float has a <em>natural page</em>, which is the page
where the element would have started if the was not a float. Unless
other constrained by lack of space or other float-* properties, page
floats should appear in their natural column on the natural page.
<div class=example>
<p>Float figure to top of natural column:
<pre>
.figure { float: top }
</pre>
<img alt="sample rendering" src=7.png>
</div>
<div class=example>
<pre>
.figure { float: top; width: 50% }
</pre>
<img alt="sample rendering" src=7b.png>
</div>
<div class=example>
<p>In this example, a figure naturally appears close to a column break. There is not enough space for the figure in the first column, and it is therefore placed in the second column, leaving white space at the bottom of the first column.</p>
<img alt="sample rendering" src=23.png>
<p>To avoid the white space, the image can be floated to the nearest edge (in the block direction):</p>
<pre>
.figure { float: snap }
</pre>
<p>In this example, the figure is already at the nearest edge, so it does not move. However, page floats allow subsequent content to be displayed before the page float and the white space can therefore be filled:</p>
<img alt="sample rendering" src=7.png>
</div>
<div class=example>
<p>In this example, two figures naturally appear in the text flow:</p>
<img alt="sample rendering" src=20.png>
<p>A typographer would typically try to avoid single lines of text above/below figures, which can be achieved with:
<pre>
div.figure { float: snap(1.5em) }
</pre>
<p>The length value specifies the reach of the snap function; in this example the second figure is affected, but not the first.
</div>
<div class=example>
<p>In this example, two figures naturally appear in the text flow:</p>
<img alt="sample rendering" src=20.png>
<p>To make the figures snap to the nearest edges, this code can be applied:
<pre>
div.figure { float: snap(2.5em) }
</pre>
<p>The resultant rendering is:</p>
<img alt="sample rendering" src=22.png>
</div>
<div class=example>
<p>Float figure to top of the natural column, spanning all columns:
<pre>
.figure { float: top; column-span: all }
</pre>
<img alt="sample redering" src=15.png>
</div>
<div class=example>
<p>In this example, tables will snap to the top/bottom if the top/bottom of the border box is closer than '3em' from the top/bottom of the page/column.
<pre>
table { float: snap }
table { float: snap(3em) }
table { float: snap(3em, bottom) }
table { float: snap(3em 2em, bottom) }
</pre>
</div>
<p class=issue>Do numeric values, to represent line numbers, make sense, like for orphans/widows?
<h3>Spanning columns</h3>
<p>The 'column-span' property is extended with integer values so that elements can span several columns. If the specified integer value is equal to, or larger than the number of columns in the multicol element, the number of columns spanned will be the same as if 'column-span: all' had been specified.
<div class=example>
<p>In this example, a commonly used newspaper layout is easily described:
<pre>
body { columns: 3 }
img.A { column-span: 2; width: 100% } /* image spans two columns */
.one { column-span: 2 } /* lead paragraph spans two columns */
</pre>
<img alt="sample rendering" src=regions.png>
</div>
<p>Further, the 'page' value is added to 'column-span' so that the page (and not the column or element) becomes the reference.
<div class=example>
<p>In this example, the footer is floated to the bottom of the last page (and not the bottom of the article element):
<pre>
footer { float: bottom; column-span: page }
<article>
...
<footer>...<.footer>
</article>
</pre>
</div>
<p class=issue>An alternative way to express this would be to add a separate propertye, e.g., <code>float-reference: column | multicol | page</code></dfn>
<h3>Deferring floats: float-defer-column, float-defer-page</h3>
<p>A page float can be deferred to a following column/page with these new properties:
<h4>'float-defer-column'</h4>
<table class=propdef>
<tr>
<td><em>Name:</em>
<td><dfn>float-defer-column</dfn>
<tr>
<td><em>Value:</em>
<td><integer> | last | none
<tr>
<td><em>Initial:</em>
<td>none
<tr>
<td><em>Applies to:</em>
<td>page floats
<tr>
<td><em>Inherited:</em>
<td>no
<tr>
<td><em>Percentages:</em>
<td>N/A
<tr>
<td><em>Media:</em>
<td>visual
<tr>
<td><em>Computed value:</em>
<td>specified value
</table>
<h4>'float-defer-page'</h4>
<table class=propdef>
<tr>
<td><em>Name:</em>
<td><dfn>float-defer-page</dfn>
<tr>
<td><em>Value:</em>
<td><integer> | last | none
<tr>
<td><em>Initial:</em>
<td>none
<tr>
<td><em>Applies to:</em>
<td>page floats
<tr>
<td><em>Inherited:</em>
<td>no
<tr>
<td><em>Percentages:</em>
<td>N/A
<tr>
<td><em>Media:</em>
<td>visual
<tr>
<td><em>Computed value:</em>
<td>specified value
</table>
<p>These properties specify whether page floats should appear in their natural column/page, or in a following column/page. Values are:
<dl>
<dt>none
<dd>the page float appears in the natural column/page
<dt><integer>
<dd>A positive integer value indicates that the page float should be displayed in a following column/page. A negative integer value indicates that the page float should be displayed in a following column/page, counted from the last column/page. When counting columns, the starting point is the last column of the multicol element on the natural page. When counting pages, the starting point is the last page of the multicol element.
</dl>
<div class=example>
<p>Float figure to the top of the column that follows the natural column:
<pre>
.figure { float: top }
.figure { float-defer-column: 1 }
</pre>
</div>
<div class=example>
<p>Float figure to the top of the next-to-last column:
<pre>
.figure { float: top; float-defer-column: -1 }
</pre>
<img alt="sample rendering" src=7.png>
</div>
<div class=example>
<p>Float figure to top of the last column of the multicol element on the current page:
<pre>
.figure { float: top; float-defer-column: last }
</pre>
<img alt="sample rendering" src=6.png>
</div>
<div class=example>
<p>In combination with 'column-span', the figure is floated to the top corner of the multicol element on that page:
<pre>
.figure { float: top; column-span: 2; float-defer-column: last; width: 100% }
</pre>
<img alt="sample rendering" src=8.png>
</div>
<div class=example>
<p>Float figure to the top of the second column, spanning two columns:
<pre>
.figure {
float: top; column-span: 2;
float-defer-column: 1;
}
</pre>
<img alt="sample rendering" src=18.png>
</div>
<div class=example>
<p>Float figure to the top right, leaving one full column:
<pre>
.figure {
float: top; column-span: 2;
float-defer-column: -1;
}
</pre>
<img alt="sample rendering" src=18.png>
<p>Given that there are four columnn, the same layout would be achived with this code:
<pre>
.figure {
float: top; column-span: 2;
float-defer-column: 1;
}
</pre>
</div>
<div class=example>
<p>Float figure to the top of the first column on the next-to-last page:
<pre>
.figure { float: top }
.figure { float-defer-page: -1 }
</pre>
</div>
<div class=example>
<p>Float figure to the top of the next-to-last column on the next-to-last page:
<pre>
.figure { float: top }
.figure { float-defer-column: -1 }
.figure { float-defer-page: -1 }
</pre>
</div>
<dt>last
<dd>The page float should be displayed in the last colum, or on the last page.
<div class=example>
<p>Float figure to the top of the last column on the natural page:
<pre>
.figure { float: top }
.figure { float-defer-column: last }
</pre>
<img alt="sample rendering" src=6.png>
</div>
<div class=example>
<p>Float figure to the last column on the last page:
<pre>
.figure { float: top }
.figure { float-defer-column: last }
.figure { float-defer-page: last }
</pre>
</div>
<dt>none
<dd>The page floats should appear in their natural column/page, if possible.
</dl>
<p>Zero is not a legal value.
<h3>Clearing page floats</h3>
<p>Page floats may request to not be stacked, or to be the only page float on a page/column through new values on the 'clear' property:
<dl>
<dt>top/bottom
<dd>The page float requests to be the only page float at the top/bottom of the column. If there is already a page float at the requested position, the page float is moved to the next column which does not have a page float in the requested position.
<dt>column
<dd>The page float requests to be the only page float in the column. If there is already another page float on the page, the page float is moved to the next page which does not have a page float.
<dt>page
<dd>The page float requests to be the only page float on the page. If there is already another page float on the page, the page float is moved to the next page which does not have a page float.
</dl>
<div class=example>
<p>In this example, the two figures may appear in the same column:
<pre>
.figure { float: bottom; clear: none }
<div class=figure></div>
<div class=figure></div>
</pre>
<img src="16.png">
</div>
<div class=example>
<p>In this example, the two figures will appear in different columns:
<pre>
.figure { float: bottom; clear: column }
<div class=figure></div>
<div class=figure></div>
</pre>
<img src="17.png">
</div>
<div class=example>
<p>In this example, the two figures may appear at the bottom of the same column due to clearing only at the top:
<pre>
.figure { float: bottom; clear: top }
<div class=figure></div>
<div class=figure></div>
</pre>
<img src="16.png">
</div>
<div class=example>
<p>In this example, the two figures will appear in different columns due to clearing at the bottom:
<pre>
.figure { float: bottom; clear: bottom }
<div class=figure></div>
<div class=figure></div>
</pre>
<img src="17.png">
</div>
<div class=example>
<p>In this example, the two figures end up the top corner of two different pages:
<pre>
.figure { float: top; float-defer-column: last; clear: page }
<div class=figure></div>
<div class=figure></div>
</pre>
</div>
<div class=example>
<p>In this example, the two figures request different positions, and
they may therefore end up in the same column:
<pre>
.figure.one { float: top; clear: top }
.figure.two { float: bottom; clear: bottom }
<div class="figure one"></div>
<div class="figure two"></div>
</pre>
</div>
<h3>Floating inside and outside pages</h3>
<p>Two allow content to flow to the inside and outside of a page, these keywords are added to the 'float' property:
<dl>
<dt>inside
<dd>On a right page, this value is synonymous with 'left'. On a left page, this value is synonymous with 'right'.
<dt>outside
<dd>On a left page, this value is synonymous with 'left', On a right page, this value is synonymous with 'right'.
</dl>
<p>These new values do not create page floats, the are simply aliases for 'left' and 'right'.
<div class=example>
<pre>
.figure { float: outside }
</pre>
</div>
<p class=issue>Should there be a way to combine float: top/bottom with left/right?
<p class=issue>Should there be a way to delete page floats that end up lonesome on pages?
<h3>Wrapping around page floats</h3>
<table class=propdef>
<tr>
<td><em>Name:</em>
<td><dfn>float-wrap</dfn>
<tr>
<td><em>Value:</em>
<td>none | wrap
<tr>
<td><em>Initial:</em>
<td>none
<tr>
<td><em>Applies to:</em>
<td>page floats
<tr>
<td><em>Inherited:</em>
<td>no
<tr>
<td><em>Percentages:</em>
<td>N/A
<tr>
<td><em>Media:</em>
<td>visual
<tr>
<td><em>Computed value:</em>
<td>specified value
</table>
<p>This property indicates whether other content may wrap around a page float:
<dl>
<dt>none
<dd>other content may not wrap around the page float
<dt>wrap
<dd>other content may wrap around the page float
</dl>
</dl>
<p>The 'intrude' value only works in combination with one of these keywords: 'left'/'right'/'top'/'bottom'/'top-corner'/'bottom-corner'.
<div class=example>
<pre class=css>
img { float: top; column-span: 2; float-wrap: wrap; width: 120%; }
</pre>
<p>In this example, the image is wider than the column and will
therefore intrude into the neighboring column. At the bottom of the
middle column is a long word that is clipped in the middle of the
column gap.
<img alt="sample rendering" src=1.png>
</div>
<h3>The 'float-offset' property</h3>
<table class=propdef>
<tr>
<td><em>Name:</em>
<td><dfn>float-offset</dfn>
<tr>
<td><em>Value:</em>
<td><length> <length> ?
<tr>
<td><em>Initial:</em>
<td>0 0
<tr>
<td><em>Applies to:</em>
<td>floated elements
<tr>
<td><em>Inherited:</em>
<td>no
<tr>
<td><em>Percentages:</em>
<td>see prose
<tr>
<td><em>Media:</em>
<td>visual, paged
<tr>
<td><em>Computed value:</em>
<td>one or two absolute lengths
</table>
<p>This property pushes a float in opposite direction of the where
it has been floated with 'float'. If one value is specified, it is
the horizontal offset. If two values are specified, the first is the
horizontal and the second is the vertical offset. If no vertical value
has been specified, the vertical offset is set to zero.
<p>This property can only influence a float along an axis it has been floated.
<div class=example>
<pre>
img {
float: left;
float-offset: 2em 3em;
}
</pre>
<p>In this example, the image is floated to the left. Therefore, 'float-offset' may only push the element in the horizontal direction, and the vertical value is ignored.
</div>
<p>Negative values are allowed; a negative values will push the float
in the same direction as it has been floated with 'float'
<p>This property may move floats into other column than where they
naturally appear.
<div class=example>
<pre>img {
float: right;
float-offset: 5px;
}
</pre>
<img alt="sample rendering" src=14.png>
</div>
<p>Percentage values are computed according to this formula:
<pre>
(containing-block-width - float-width) * percentage
(containing-block-height - float-height) * percentage
</pre>
<div class=example>
Pull quotes are often centered in a column. In this example, the pull quote is floated to the right, and then pushed back into the center.
<img width=213 src="exclusion_wrap_side_left.png">
<pre>
.pullquote {
float: right;
float-offset: 50%; /* 50% centers the box */
}
</pre>
</div>
<p>When negative values are set on this property, the column gap is also part of the calculation:
<pre>
((containing-block-width + 2 * column-gap) - float-width) * percentage
</pre>
<div class=example>
<pre>img {
float: top right;
float-offset: -50% 3em; /* 50% centers the box */
width: 120%;
}
</pre>
<img alt="sample rendering" src=11.png>
</div>
<div class="example">
<pre>
img {
float: top right;
float-offset: -80% 2em;
width: 100%;
}
</pre>
<img alt="sample rendering" src=12.png>
</div>
<!--
<h2>Page and column floats, alternative syntax</h2>
<p>This section describes an alternative syntax for page and column floats.
<p>Four new keywords on 'float' have been added:
<dl>
<dt>left, right, top, bottom
<dd>relative to physical viewport
<dt>line-left, line-right
<dd>relative to inline axis
<dt>before, after
<dd>relative to block direction
<dt>inside, outside
<dd>as described in the previous section
<dt>footnote
<dd>as described above
<dt>columns(n)
<dd>makes the float span n columns, and sets the float context to be the multicol element
<dt>page
<dd>sets the float context to be the page
</dl>
<div class=example>
<p>Float figure to the top right corner of the multicol element, spanning two columns:
<pre>
.figure { float: top rigth columns(2); width: 100% }
</pre>
<img alt="sample rendering" src=8.png>
</div>
<div class=example>
<p>Float figure to top of the last column of the multicol element on the current page:
<pre>
.figure { float: top right columns(1) }
</pre>
<img alt="sample rendering" src=6.png>
</div>
<div class=example>
<p>Float figure to the top right of the current element, allowing other content on its side:
<pre>
.figure { float: top right; width: 60% }
</pre>
<img alt="sample rendering" src=13.png>
</div>
<div class=example>
<p>Escape the multicol element and float to the top right of the page area:
<pre>
.figure { float: top right page }
</pre>
</div>
-->
<h3>Overconstrained page floats</h3>
<p>In many cases, the specified values on these properties cannot be honored.
<div class=example>The number of columns is limited, and high values therefore cannot be honored:
<pre>
.figure { float: top; float-defer-column: 1000 }
</pre>
</div>
<div class=example>A narrow screen may only have room for one column, in which case this request cannot be honored:
<pre>
.figure { float: top; float-defer-column: -5 }
</pre>
</div>
<div class=example>In long documents, all content cannot fit on the last page, and this rule therefore cannot be honored:
<pre>
p { float: top; float-defer-page: last }
</pre>
</div>
<p>Page floats are processed in the order they appear in the source. However, the visual order of page floats may not ne the same as the source order.
<div class=example>Consider this code:
<pre>
.one { float: top; float-defer-page: last; column-span: all }
.two { float: top; clear: column }
<div class=one></div>
<div class=two></div>
</pre>
<p>In this example, the first element requests to appear on the last page, while the second element requests to appear in the natural column. If the natural column of the second element appears on a page before the last page, the second element will appear visually before the first.
</div>
<div class=example>Consider this code:
<pre>
.one { float: top; float-defer-page: last; column-span: all }
.two { float: top; clear: column }
<div class=one></div>
<div class=two></div>
</pre>
<p>If all content can fit on one page, the first page will also be the last page. The first element is processed first and is placed on top of the first page. Then the second element is processed. It reqests a clear top, somthing which is not possible on the first page. Therefore, a second page is created and the first element is moved there. Even if the first element requests to be on the last page, it will not appear there.
</div>
<p>When resolving over-constrained layouts, the order of importance for defined goals are:
<ol>
<li>honor basic multi-column layout ('columns', 'column-span: all', 'column-gap' etc)
<li>honor 'column-span: <integer>'
<li>honor 'clear: top/bottom/pcolumn/page'
<li>honor 'float-defer-page'
<li>honor 'float-defer-column'
<li>honor 'float: top/bottom'
<li>display all content (as described by other CSS properties)
<li>keep the number of pages to a minimum
</ol>
<h2>Exclusions</h2>
<h3>The 'clear-side' property</h3>
<table class=propdef>
<tr>
<td><em>Name:</em>
<td><dfn>clear-side</dfn>
<tr>
<td><em>Value:</em>
<td>auto <!-- | left | right--> | both
<tr>
<td><em>Initial:</em>
<td>auto
<tr>
<td><em>Applies to:</em>
<td>floated elements
<tr>
<td><em>Inherited:</em>
<td>no
<tr>
<td><em>Percentages:</em>
<td>N/A
<tr>
<td><em>Media:</em>
<td>visual, paged
<tr>
<td><em>Computed value:</em>
<td>as specified
</table>
<p>This property declares if the side of a float should be cleared of
content. Values have the following meaning:
<dl>
<dt>auto
<dd>if the float is left-floated, there should be no content to the left; if the float is right-floated, there should be no content to the right
<!_-
<dt>left
<dd>there should be no content to the left of the float
<dt>right
<dd>there should be no content to the left of the float
-->
<dt>none
<dd>there may be content on either side of the float
</dl>
<!--
<h3>Pull-quotes</h3>
<div class=example>
<img width=213 src="exclusion_wrap_side_left.png">
<pre>
.pullquote {
float: right;
float-offset: 5em;
}
</pre>
<pre>
.pullquote {
float: right;