Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Making lines invisible on printouts - Resolved

    Is there a way to have a sentence appear on your page, but when you print the page out, the sentence does not appear?

    Example:

    I want the page to have a link that says:
    "Return to regular version"

    I don't want that to appear on printouts.

    Any ideas?

    Thanks
    Doc
    Last edited by docmombo; 12-23-2005 at 03:36 PM. Reason: Resolved

  • #2
    Regular Coder Masterslave's Avatar
    Join Date
    Dec 2005
    Posts
    287
    Thanks
    2
    Thanked 0 Times in 0 Posts
    You can add this in the head of your HTML docuemnt:

    Code:
    <link rel="stylesheet" href="css/print.css" type="text/css" media="print" />
    Then wrap a span tag around the sentence like this:
    Code:
     <span class="noprint">Return to regular version</span>
    In the print.css you enter this line
    Code:
    .noprint
    {
    display: none;
    }
    This worked for me.

  • #3
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Did not work

    This made the printing invisible on the screen. I want it invisible when it prints the page, but visible on the screen.

    Thanks for your help.

    Doc

  • #4
    Regular Coder Masterslave's Avatar
    Join Date
    Dec 2005
    Posts
    287
    Thanks
    2
    Thanked 0 Times in 0 Posts
    This line:
    Code:
    <link rel="stylesheet" href="css/print.css" type="text/css" media="print" />
    media="print" will say that the CSS is working when you are printing.
    Did you have add media="print" in the line of your link tag?

    So, when you browse to the page you've to see your sentence, when you printing, it's not visible.

  • #5
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    You were right...

    It's like you were reading the code on the computerr...I did forget the media=print statement. My fault.

    The code did work.

    Thank you so much.

    Doc

  • #6
    Regular Coder Masterslave's Avatar
    Join Date
    Dec 2005
    Posts
    287
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Hehe, most people don't see the media thing, I thought by myself, o he's forget to add the media.
    I'm happy that it's working.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •