fix page size in html

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nikou_70
    New Member
    • Nov 2005
    • 10

    fix page size in html

    I write a page in HTML ,user can print it I want to fix page size in print page set up to (legal) that doesn't need user every time change option how I can do this.
  • Niheel
    Recognized Expert Moderator Top Contributor
    • Jul 2005
    • 2432

    #2
    Place your content inside a table that is fixed width.
    niheel @ bytes

    Comment

    • fuse-box
      New Member
      • Apr 2006
      • 4

      #3
      I think you can download special templates for text or as the admin said place the text in a table. :)
      Good Luck
      =============== =============== ===

      Comment

      • Banfa
        Recognized Expert Expert
        • Feb 2006
        • 9067

        #4
        CSS would be you best option for fixing the width of your content. You can set different settings for on-screen and printed output (and a number of other different medias).

        The easiest way to do these is by using 2 separate CSS files (although there are other ways to do it) like this

        [html]
        <link href="standard. css" rel="stylesheet " title="Standard " type="text/css" />

        <link href="print.css " rel="stylesheet " media="print" title="Standard " type="text/css" />
        [/html]

        In the standard CSS file you leave the page width along, in the print CSS file you set the page width like so

        Code:
        body {
            width= 8.5in;
        }
        However that is not what you asked, you have not asked how to fix the content width but would to fix the destination paper size. This is actually part of the printer set-up, the paper size most browsers use is the default printer page size. This can normally be set from the printer set-up available from control panel.

        In Windows XP

        Control Panel -> Printer and Faxes -> <Printer to Access>

        The from displayed printer window

        Printer -> Printing Preferences...

        Dispays the printing preferenecs dialog. Since these are printer manufacturer dependent I can not give you any further instructions but somewhere in the preferences you will find an option to set the prefered printer page size.

        Comment

        • jepoy
          New Member
          • Aug 2007
          • 1

          #5
          Can you show me some codes on how to use css print in html file.

          Thanks

          Comment

          • drhowarddrfine
            Recognized Expert Expert
            • Sep 2006
            • 7434

            #6
            @media rules . .

            Comment

            Working...