Contents | < Color Management | Absolute Positioning >

Floats

fo:float element inserts an out-of-line block-level element such as a figure or a pull quote onto the page. The float property determines which side of the page it floats on and the clear property determines whether and where other elements are allowed to float around it.

<fo:block text-align="justify">
	<fo:float  float="start">Œ
		<fo:block font-size="72pt" line-height="1" margin="5pt" text-depth="0" >L</fo:block>
	</fo:float>orem ipsum dolor sit amet, consetetur sadipscing elitr ...
 </fo:block>
For the complete source code for this code example see "Tutorial/DropCap.fo" located under XML Documents Samples/Tutorial folder.

The rendering result is displayed in the next figure.

Figure 1

There are several things to notice in this example:

Œ Each fo:float element should specify the floating side as either "start" or "end".

 Depending on the text you want to display, you may wish to eliminate the descent portion by setting the text-depth to 0.

 

Contents | < Color Management | Absolute Positioning >