Suscriber with us



Receive HTML?

Syndicate

CSS2 Print PDF Print E-mail

Print Properties

Printing HTML documents has always been problematic. In CSS2 the print properties are added to make it easier to print from the Web.

page-break-after Property

Definition

The page-break-after property sets the page-breaking behavior after an element.

Note: You can not use this property on absolutely positioned elements.

Note: Use the page-breaking properties as few times as possible and avoid page-breaking properties inside tables, floating elements, and block elements with borders.

Inherited: No

JavaScript Syntax

CSS properties can also be dynamically changed with a JavaScript.

Scripting Syntax: object.style.pageBreakAfter="always"

Example

table

page-break-after: always
}

Possible Values

Value Description

auto 

Default. Insert a page break after the element if necessary 

always 

Insert a page break after the element 

avoid 

Avoid inserting a page break after the element 

left 

Insert page breaks after the element until it reaches a blank left page 

right 

Insert page breaks after the element until it reaches a blank right page 

page-break-inside Property

The page-break-inside property sets the page-breaking behavior inside an element.

Note: You can not use this property on absolutely positioned elements.

Note: Use the page-breaking properties as few times as possible and avoid page-breaking properties inside tables, floating elements, and block elements with borders.

Inherited: No

JavaScript Syntax

CSS properties can also be dynamically changed with a JavaScript.

Scripting Syntax: object.style.pageBreakInside="avoid"

Example

p

page-break-inside: avoid
}

Possible Values

Value Description

auto 

Default. Insert a page break inside the element if necessary 

avoid 

Avoid inserting a page break inside the element 

The links in the "Property" column point to more useful information about the specific property.

PHPGURU: The number in the "PHPGURU" column indicates in which CSS recommendation the property is defined (CSS1 or CSS2).

 PropertyDescriptionValuesPHPGURU

orphans

Sets the minimum number of lines for a paragraph that must be left at the bottom of a page

number

 2

marks

Sets what sort of marks should be rendered outside the page box

none
crop
cross

  

page

Sets a page type to use when displaying an element

auto
identifier

page-break-after

Sets the page-breaking behavior after an element

auto
always
avoid
left
right

page-break-before

Sets the page-breaking behavior before an element

auto
always
avoid
left
right

page-break-inside

Sets the page-breaking behavior inside an element

auto
avoid

size

Sets the orientation and size of a page

auto
portrait
landscape

  

widows

Sets the minimum number of lines for a paragraph that must be left at the top of a page

number

2  





Digg!Del.icio.us!Google!Live!Facebook!Slashdot!Technorati!StumbleUpon!Newsvine!Yahoo!Free social bookmarking plugins and extensions for Joomla! websites!
Last Updated ( Monday, 17 March 2008 )
 
< Prev   Next >

CSS Examples

Examples

Polls

Which is the best Scripting language?