spacer
Yehuda Shiran August 5, 2001
Content Rendering
Tips: August 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

The 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:

  • 5.5 inches wide
  • 8 inches high
  • 1 inch margin from all sides
  • White background
  • 1 inch wide gray dashed border

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.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business