August 5, 2001 - Content Rendering
August 5, 2001 Content Rendering Tips: August 2001
Yehuda Shiran, Ph.D.
|
LayoutRect
behavior formats the page content itself. You need one LayoutRect
per page. The LayoutRect
element is defined inside the DeviceRect
element. The content of each LayoutRect
element is limited to one page. Once a page is filled, formatting jumps to the next page automatically. You need to define LayoutRect
's style. Suppose we want the content portion of the page to have the following characteristics:
We can define a style, contentstyle
, as follows:
<STYLE TYPE="text/css">
.contentstyle
{
width:5.5in;
height:8in;
margin:1in;
background:white;
border:1 dashed gray;
}
</STYLE>
We can use the LayoutRect
elements to format any content. Examine what yesterday's tip looks like with the style above. Here is the HTML code:
<HTML>
<HEAD>
<?IMPORT NAMESPACE="IE" IMPLEMENTATION="#default">
<STYLE TYPE="text/css">
.contentstyle
{
width:5.5in;
height:8in;
margin:1in;
background:white;
border:1 dashed gray;
}
</STYLE>
</HEAD>
<BODY>
<IE:LAYOUTRECT ID="layoutrect1" CONTENTSRC="010804.html" CLASS="contentstyle" NEXTRECT="layoutrect2"/>
<IE:LAYOUTRECT ID="layoutrect2" CLASS="contentstyle"/>
</BODY>
</HTML>
For more information on print templates, go to Column 89, Print Templates, Part I.