Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Senior Member
    Join Date
    Feb 2011
    Location
    England
    Posts
    103
    Member #
    26718
    Liked
    3 times
    Hi, here is the page I am referring to:http://www.17minutes.f2s.com/Gallery3.htm

    It utilises the Simple Controls Gallery plug in. What I'm trying to is probably very simple but I just can't crack it.
    I would like to be able to print the image being viewed at that time. I could print the whole page easily enough but would waste a load of ink printing the page borders etc. The gallery resides in a div in a table and I just can't figure out how to print ONLY the image being viewed at that time.
    I understand a print CSS may do the job but as I am only just learning about css it will be a long way off and I need to get this job finished for a friend asap.
    I believe it's possible to print a div but again am lost as to how.
    If someone can show me the way with actual code I can achieve two things:
    1) learn and avoid cracking up! I learn best from examples.
    2) get this finished and handed over.

    many thanks, Lol

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    <link href="(your screen stylesheet)" type="text/css" media="screen" /> <-- this would give you a screen-only stylesheet.
    <link href="(your print stylesheet)" type="text/css" media="print" /> <-- this would give you a print-only stylesheet.

    Basically, you'll define one set of rules that show up on the screen and one set of rules that show up for print.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Senior Member
    Join Date
    Feb 2011
    Location
    England
    Posts
    103
    Member #
    26718
    Liked
    3 times
    Thanks I've seen that somewhere on my MANY trawls through the web. I now have to figure out how to use it.

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    How to use it in general, or how to use it in your specific application?

    In general, the oversimplified way to view it is that "print stylesheets are stylesheets for a specially formatted web page." In this case, your page is 8.5" x 11" (or 14"), can use fixed font sizes (for print, this is okay because the medium can't be resized anyway), and you can display or hide things in print that you don't necessarily want to in screen.

    For example, whenever I design a print stylesheet, I usually hide the menus. Why? No one's going to be able to click on them anyway.

    Hopefully that helps you a bit with your thinking.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Senior Member
    Join Date
    Feb 2011
    Location
    England
    Posts
    103
    Member #
    26718
    Liked
    3 times
    Hi - I meant both! However, for this application I've come up with a "solution" that is long winded but works.
    Basically the image I was wanting to print wasn't big enough anyway so to print a larger image each one has it's own simple page. Clicking on the image in the viewer opens this new page with the larger image in it.
    In the body I have set onLoad.print and a timer delay for onload.back-1 to take us back to the image viewer.
    A bit heavy handed but it works and at this stage functionality trumps form.
    Thanks for your help, Lol

  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    That's not a bad way to do it for a private application, if you have control of the client's browser.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  8. #7
    Senior Member
    Join Date
    Feb 2011
    Location
    England
    Posts
    103
    Member #
    26718
    Liked
    3 times
    Yeah it's running on IIS and I will be disabling toolbars etc so it's all cool.
    Thanks for your help, again!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:14 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com