34 users online (0 members and 34 guests)  


  Results 1 to 6 of 6

Related

  1. Page Printing    Forum: HTML Forum
    Replies: 3
  2. Printing    Forum: HTML Forum
    Replies: 0
  3. Printing with CSS    Forum: CSS Forum
    Replies: 3
  4. printing    Forum: CSS Forum
    Replies: 5
  1. #1
    jaywig's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2004
    Location
    Montreal
    Posts
    6

    Non-printing of images...help me, please.

    I'm making an html email template that includes linked images to various websites. I was wondering if anybody knows if I can make it so that when the recipient of the email decides to print the received message, the images do not print, just the pertinent information prints.
    Any suggestions are most welcome. Thanks in advance.

  2. #2
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    The printing of images is designated by the user through the OS, I am not aware of any code to turn them off.

    In case I am wrong I am moving to the scripts forum where somebody else may be of help.

    Dave

  3. #3
    jaywig's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2004
    Location
    Montreal
    Posts
    6
    Quote Originally Posted by Dave
    The printing of images is designated by the user through the OS, I am not aware of any code to turn them off.

    In case I am wrong I am moving to the scripts forum where somebody else may be of help.

    Dave
    Really? I was sure that there were some tags or script or something that allowed the creator of a webpage (which is, in effect, what a html email template is) to specify what gets printed when a viewer chooses to print it. I'm interested in only blocking certain images from not printing, while others can.

    Thanks for the input though, Dave.

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    You can do it with CSS. try

    Code:
    <style type="text/css" media="print">
    img
    {
    display: none;
    }
    </style>
    Make sure thats the last bit of CSS in your page, and it should work.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  5. #5
    jaywig's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2004
    Location
    Montreal
    Posts
    6

    Found new info...

    Thanks, worked like a charm, but...that removed all images from the printed page. I just found out that you can do it as follows:

    <style type="text/css" media="print">
    .noshow
    {
    display: none;
    }
    </style>

    Then, in the img tags for the images you don't want printed, you simply put: <img src="image.jpg" class="noshow">

    Thanks again.
    Last edited by jaywig; 02-10-2004 at 09:53 AM. Reason: Found new info...

  6. #6
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Sorry, you stated 'the images' which made me think you wanted rid of all of them. Glad you got it working.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread