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 a web page

Printing a web page

Scheduled Pinned Locked Moved Web Development
javascriptcsshelpquestion
3 Posts 3 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.
  • P Offline
    P Offline
    papy boom
    wrote on last edited by
    #1

    hi all, i'm trying to use javascript funtcion 'javascript:window.print();' to print current webpage. the problem that i lose all my color font, layout when i do the print. is there something to add to CSS to print the same page as it is shown on screen ? Thank you for helping me :)

    A M 2 Replies Last reply
    0
    • P papy boom

      hi all, i'm trying to use javascript funtcion 'javascript:window.print();' to print current webpage. the problem that i lose all my color font, layout when i do the print. is there something to add to CSS to print the same page as it is shown on screen ? Thank you for helping me :)

      A Offline
      A Offline
      Adam Maras
      wrote on last edited by
      #2

      Make sure the CSS you're using isn't scoped to just the 'screen.' If it is, you'll have no stylesheets while printing :doh:

      1 Reply Last reply
      0
      • P papy boom

        hi all, i'm trying to use javascript funtcion 'javascript:window.print();' to print current webpage. the problem that i lose all my color font, layout when i do the print. is there something to add to CSS to print the same page as it is shown on screen ? Thank you for helping me :)

        M Offline
        M Offline
        Marc Firth
        wrote on last edited by
        #3

        /* your print styles */

        /* your screen styles */

        Neonlight

        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