Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Printing margins

Printing margins

Scheduled Pinned Locked Moved Web Development
htmlcsscomhelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dustin Metzgar
    wrote on last edited by
    #1

    Let's say I have a specific margin set to the body of my HTML page.  I do it through CSS like so:

    body {
                    margin-left: 50px;
                    margin-right: 50px;
                    margin-top: 20px;
                    margin-bottom: 20px;
                }

    When this HTML gets printed, the margins seem to affect the print-out. Is there a way to fix this through CSS?


    Logifusion[^]

    E 1 Reply Last reply
    0
    • D Dustin Metzgar

      Let's say I have a specific margin set to the body of my HTML page.  I do it through CSS like so:

      body {
                      margin-left: 50px;
                      margin-right: 50px;
                      margin-top: 20px;
                      margin-bottom: 20px;
                  }

      When this HTML gets printed, the margins seem to affect the print-out. Is there a way to fix this through CSS?


      Logifusion[^]

      E Offline
      E Offline
      Edbert P
      wrote on last edited by
      #2

      You could specify for which media you declare your CSS for. Have a look at this[^] specification.

      "A democracy is nothing more than mob rule, where fifty-one percent of the people may take away the rights of the other forty-nine." - Thomas Jefferson "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." - Benjamin Franklin Edbert Sydney, Australia

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups