Re: Printing a page

Discussion in 'HTML' started by Jonathan N. Little, Nov 4, 2008.

  1. sheldonlg wrote:
    > I have a fixed height form for a customer. One area on the form has all
    > the data. This area is scrollable. Is there a way to print the entire
    > data area including what is not yet seen until you scroll?


    Yeah, for the printing version stylesheet don't have the form a fixed
    height!

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Nov 4, 2008
    #1
    1. Advertising

  2. sheldonlg wrote:
    > Jonathan N. Little wrote:
    >> sheldonlg wrote:
    >>> I have a fixed height form for a customer. One area on the form has
    >>> all the data. This area is scrollable. Is there a way to print the
    >>> entire data area including what is not yet seen until you scroll?

    >>
    >> Yeah, for the printing version stylesheet don't have the form a fixed
    >> height!
    >>

    >
    > Obviously. However, that gives a problem in generating a "printable"
    > version that I posted in the javascript newsgroup. So, **is** there a
    > way to print directly from the page that has a fixed length?


    URL?

    If you want it it look one way but point another then style is so...

    @media screen {
    ..whatever { height: 20em; }
    }
    @media print{
    ..whatever { height: auto; }
    }

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Nov 4, 2008
    #2
    1. Advertising

  3. sheldonlg wrote:
    > Jonathan N. Little wrote:
    >> sheldonlg wrote:
    >>> Jonathan N. Little wrote:
    >>>> sheldonlg wrote:
    >>>>> I have a fixed height form for a customer. One area on the form
    >>>>> has all the data. This area is scrollable. Is there a way to
    >>>>> print the entire data area including what is not yet seen until you
    >>>>> scroll?
    >>>>
    >>>> Yeah, for the printing version stylesheet don't have the form a
    >>>> fixed height!
    >>>>
    >>>
    >>> Obviously. However, that gives a problem in generating a "printable"
    >>> version that I posted in the javascript newsgroup. So, **is** there
    >>> a way to print directly from the page that has a fixed length?

    >>
    >> URL?
    >>
    >> If you want it it look one way but point another then style is so...
    >>
    >> @media screen {
    >> .whatever { height: 20em; }
    >> }
    >> @media print{
    >> .whatever { height: auto; }
    >> }
    >>

    >
    > I converted the layout so that there is no fixed height area for the
    > content and the form now stretches as need be. The printing, of course,
    > prints everything out. However, what happens it that the banner area
    > prints on one page and the content starts on another and flows into the
    > following page. I tried surrounding the the blocks that I didn't want
    > to print with the @media screen in the css.
    >
    > How can I make it either:
    >
    > 1 - start the content immediately after the banner area
    > or, even better
    > 2 - not print the banner area at all. The outline of the page is:
    >
    > <div id="wrapper"> (position: relative)
    > <div id="banner_wrapper"> (position: relative)
    > <div id="client_logo_wrapper"> (position: absolute)
    > --- the logo --
    > </div>
    > <div id="banner_right_wrapper"> (position: relative)
    > <div id="h_wrapper"> -- picture -- </div> (position: relative)
    > <div id="menu_wrapper"> -- menu --</div> (position: relative)
    > </div>
    > </div>
    > <div id="divider"></div> (position: relative)
    > <div id="content_wrapper"> (position: relative)
    > <div id="content"> (position: relative)
    > --- the data I want to print ---
    > </div>
    > </div>
    > <div id="footer"> -- the footer -- </div> (position: relative)
    > </div>
    >
    > I would like to print out just the <<div id="content"> or <div
    > id="content_wrapper"> stuff.


    Looks like DIVidious but here is goes. As I said before just define a
    print stylesheet and screen stylesheet as to do as you wish

    @media print{

    .banner_wrapper {display: none; }
    /* if you don't want 'divider' uncomment next line */
    /* .divider {display: none; } */
    /* if you don't want 'footer' uncomment next line */
    /* .footer{display: none; } */
    }


    I typically have a print stylesheet like:

    #navbar,
    #banner { display: none; }

    /* display links as plain text, looks nicer in print /*
    a { color: #000; background: #fff; text-decoration: none; }


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Nov 4, 2008
    #3
  4. sheldonlg wrote:
    > sheldonlg wrote:
    >
    >>
    >> GOT IT! Thanks!!!!
    >>
    >> I put this in:
    >>
    >> @media print {
    >> #banner_wrapper {display:none;}
    >> #footer {display:none;}
    >> }

    >
    >
    > ...and then it stopped working. I was having a problem on IE6 the spry
    > horizontal menus were hidden behind the next div. So, on the menu
    > wrapper I added a z-index. That made the menus work, but now it is
    > ignoring the @media print.


    You keep ask "What am I doing wrong?" yet when you are given the answer
    your *refuse* to take our advice...to supply a URL to what you are
    trying to do! So *we may see* what your are doing wrong and have a
    chance to give you a solution. A far better strategy than you trying to
    tell us what the problem is when you have no idea!

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Nov 5, 2008
    #4
  5. sheldonlg wrote:

    > Oh! I didn't **refuse**. I simply didn't catch that when you wrote
    > "URL" at the beginning of an answer, that you were asking for the URL.
    > Sorry about that. I prepared an example to show you, but it worked. I
    > went back to my actual site, an it is working again. So, sorry for not
    > catching that you wanted a URL, and thank you again for your help. It
    > solved the problem.


    I am glad that it worked for you. My criticism on lack of URL was not
    solely confined to this thread. Others threads of yours solutions could
    have been more efficiently resolved had you included a URL at the start...

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Nov 5, 2008
    #5
  6. Jonathan N. Little

    rf Guest

    <sheldonlg> wrote in message
    news:...
    > Jonathan N. Little wrote:
    >> sheldonlg wrote:
    >>
    >>> Oh! I didn't **refuse**. I simply didn't catch that when you wrote
    >>> "URL" at the beginning of an answer, that you were asking for the URL.
    >>> Sorry about that. I prepared an example to show you, but it worked. I
    >>> went back to my actual site, an it is working again. So, sorry for not
    >>> catching that you wanted a URL, and thank you again for your help. It
    >>> solved the problem.

    >>
    >> I am glad that it worked for you. My criticism on lack of URL was not
    >> solely confined to this thread. Others threads of yours solutions could
    >> have been more efficiently resolved had you included a URL at the
    >> start...

    >
    > I understand. However, on a number of those that I posted in the past, it
    > was impossible to give a URL as the URL was behind a firewall and
    > accessible only via VPN. Whenever I can make a simple example that is
    > accessible, I usually do.


    And this very thread highlights the value of doing just that, preparing a
    simple example to show us the exact problem. More often than not the
    preparation of the simple example shows you what the problem is.

    And when you prepare the simple example show it to the validator before
    showing it here. Many times the validator will point out the problem (which
    is usually a typo).

    The first thing many do here *when a URL is supplied* is to show that URL to
    the validator. I have seen many times the following:

    OP: I have a problem.
    Us: URL?
    OP: supplies url.
    Us: Validate it, you have twenty seven errors.
    OP: Yep, that fixed it.
    rf, Nov 6, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon B
    Replies:
    7
    Views:
    7,501
    =?Utf-8?B?SmFzb25DaG9p?=
    Jan 30, 2006
  2. JustSomeGuy
    Replies:
    13
    Views:
    507
    msalters
    Dec 9, 2004
  3. iffy agbim
    Replies:
    1
    Views:
    105
    Mark Andrews
    May 24, 2004
  4. iffy agbim
    Replies:
    0
    Views:
    102
    iffy agbim
    May 21, 2004
Loading...

Share This Page