Results 1 to 4 of 4

Thread: Page formatting for printing with CSS

  1. #1
    Join Date
    Sep 2010
    Posts
    23

    Page formatting for printing with CSS

    I have done the basics of CSS. I want to know about the properties that are used while doing some printing. Since, I have recently started learning about the CSS, I am not able to do some R & D. So thought to post here and wait for some help. I am expecting someone to provide some useful information (as you always do.. ). More information about the paged media styles of CSS for printing would be grateful. I think that I have told this time properly about my requirements.

  2. #2
    Join Date
    May 2008
    Posts
    255

    Re: Page formatting for printing with CSS

    With the properties included in the section it is possible to define in detail how to format the page in view of the press, from size to finish the orientation of the same: just as you would in an ordinary word-processor. With the @ page directive, for example, we can set this rule:
    @ Page {size: 210mm 297mm; margin: 30mm;}
    The layout of the page being printed will be that of a normal sheet of A4 paper with margins of 3cm on all sides.

  3. #3
    Join Date
    Oct 2008
    Posts
    93

    Re: Page formatting for printing with CSS

    The bulk of the section is devoted to the management page breaks when printing. It 's a serious issue. How many times trying to print a web page you've found a table split between two pages? Well. To resolve this problem have been implemented ad hoc property. All should strive to avoid incorrect behavior deemed :
    • a page break at the edges of blocks
    • a page break in the middle of a table
    • stop at a page of evidence submitted to the floating
    Even in these respects there are ad hoc properties:
    • page-break-after
    • page-break-before
    • page-break-inside

  4. #4
    Join Date
    Oct 2008
    Posts
    116

    Re: Page formatting for printing with CSS

    Thanks to them it is possible for each item with accuracy and when and where to insert a page break. For example, if I want to avoid disruption in the body of the table write:
    Code:
    table {page-break-inside: Avoid;}
    But if I have a number of sections of summary at the end of which I always want a break I will use this rule:
    Code:
    div.tablecontents {page-break-after: always;}
    page-break-after and break-before-p age are the only two decent properties supported by all browsers. including the most powerful aspect of this is Opera.

Similar Threads

  1. Add-on for printing selected page in Mozilla Firefox
    By Urjavaha in forum Technology & Internet
    Replies: 6
    Last Post: 06-11-2011, 11:02 PM
  2. Multi-Page Printing in Adobe AIR
    By Algonkin in forum Windows Software
    Replies: 6
    Last Post: 05-07-2010, 10:43 PM
  3. Replies: 5
    Last Post: 19-03-2010, 05:47 AM
  4. How to copy content from web page without formatting?
    By bharti_rajpal in forum Technology & Internet
    Replies: 5
    Last Post: 13-01-2010, 05:01 PM
  5. Page Border problem while printing
    By Arlo in forum Windows Software
    Replies: 3
    Last Post: 25-06-2009, 11:59 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,635,485.28548 seconds with 17 queries