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

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

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, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint