Problem with printing gallery

Discussion in 'HTML' started by Nico Schuyt, May 6, 2005.

  1. Nico Schuyt

    Nico Schuyt Guest

    Nico Schuyt, May 6, 2005
    #1
    1. Advertising

  2. Nico Schuyt

    Gazza Guest

    Nico Schuyt mumbled the following on 06/05/2005 08:14:
    > I built a gallery with two-cell tables (based on
    > http://www.cs.tut.fi/~jkorpela/www/captions.html)
    > Perfect on screen but a mess on printing (IE6; Slightly better in FireFox)
    >
    > A basic example on http://www.hermansmith.nl/p_print.htm
    > (No need to print on paper. The preview is enough)
    >
    > Anyone an idea what's the problem?


    Apart from your HTML being messy (one table per image?!?!), I think the
    problem is 2-fold.
    1) ISTR that IE has a problem with printing floated elements, so
    de-float them when you come to print. Add the following to your CSS:

    @media print {
    table.image { float: none; }
    }

    2) Secondly, you may be able to tweak the margins and padding for
    printing by setting the appropriate styles in the @media print
    definition above. This might help to get three or more images in a row
    on the paper.

    Sort out the HTML first though - Have a better read of Jukka's Fluid
    Galleries section on the page you mentioned, and read
    http://www.alistapart.com/articles/practicalcss/ . Both of these will
    help you setup the page so it is more flexible when it comes to
    achieving what you want when the page is printed.

    --
    Gazza
    Mobile Number Network Checker - http://mnnc.net/
    Creative writing & Poems - http://garyjones.co.uk/
    Leovanna Leonbergers - http://leovanna.co.uk/
    Gazza, May 6, 2005
    #2
    1. Advertising

  3. Nico Schuyt

    Nico Schuyt Guest

    Gazza wrote:
    > Nico Schuyt mumbled the following on 06/05/2005 08:14:
    >> I built a gallery with two-cell tables (based on
    >> http://www.cs.tut.fi/~jkorpela/www/captions.html)
    >> Perfect on screen but a mess on printing (IE6; Slightly better in
    >> FireFox)
    >> A basic example on http://www.hermansmith.nl/p_print.htm
    >> (No need to print on paper. The preview is enough)
    >> Anyone an idea what's the problem?


    > Apart from your HTML being messy (one table per image?!?!),


    Ehhh, it's the "The two-cell approach" from the article of Jukka. That
    *can't* be messy :)
    I tried it before with div boxes but failed because of the need of vertical
    align images.

    > I think
    > the problem is 2-fold.
    > 1) ISTR that IE has a problem with printing floated elements, so
    > de-float them when you come to print. Add the following to your CSS:
    >
    > @media print {
    > table.image { float: none; }
    > }
    >
    > 2) Secondly, you may be able to tweak the margins and padding for
    > printing by setting the appropriate styles in the @media print
    > definition above. This might help to get three or more images in a row
    > on the paper.
    >
    > Sort out the HTML first though - Have a better read of Jukka's Fluid
    > Galleries section on the page you mentioned,


    Jukka's page seems to have no problems with printing of the fluid gallery so
    the solution must be in there indeed :).

    > and read
    > http://www.alistapart.com/articles/practicalcss/ . Both of these will
    > help you setup the page so it is more flexible when it comes to
    > achieving what you want when the page is printed.


    I'll do that. Thanks for your comprehensive reply!

    --
    Nico
    http://www.nicoschuyt.nl
    Nico Schuyt, May 6, 2005
    #3
  4. Nico Schuyt

    Gazza Guest

    Nico Schuyt mumbled the following on 06/05/2005 10:47:
    > Gazza wrote:
    >
    >>Nico Schuyt mumbled the following on 06/05/2005 08:14:


    > Ehhh, it's the "The two-cell approach" from the article of Jukka. That
    > *can't* be messy :)


    Usually I'd agree, but in this case, I'd tend towards another of his
    suggestions.

    > I tried it before with div boxes but failed because of the need of vertical
    > align images.


    There's a demo of what you can do with tidier code (saving about 39%
    code for the main image-displaying section) at:
    http://garyjones.co.uk/development/herman.html

    When I left it a couple of hours ago though, the print preview for IE
    was completely screwed, and in trying to fix it, think I screwed FF too.
    Although it doesn't answer your original problem, ignoring any CSS that
    deals with printing, the example is an alternative structure to your page.

    >>I think
    >>the problem is 2-fold.
    >>1) ISTR that IE has a problem with printing floated elements, so
    >>de-float them when you come to print. Add the following to your CSS:
    >>
    >>@media print {
    >>table.image { float: none; }
    >>}


    OK, total crap - whoever wrote that deserves to be incarcerated. What I
    think this moron was refering to can be found in the 7th paragraph of
    http://www.alistapart.com/articles/goingtoprint/ . Having tried my
    suggestion myself, I can see what utter tosh this help was. Ignore it,
    as it won't help your original problem in the slightest.
    --
    Gazza
    Mobile Number Network Checker - http://mnnc.net/
    Creative writing & Poems - http://garyjones.co.uk/
    Leovanna Leonbergers - http://leovanna.co.uk/
    Gazza, May 6, 2005
    #4
  5. Nico Schuyt

    Nico Schuyt Guest

    Gazza wrote:
    > Nico Schuyt mumbled the following on 06/05/2005 10:47:
    >> Gazza wrote:
    >>> Nico Schuyt mumbled the following on 06/05/2005 08:14:


    >> Ehhh, it's the "The two-cell approach" from the article of Jukka.
    >> That *can't* be messy :)


    > Usually I'd agree, but in this case, I'd tend towards another of his
    > suggestions.


    >> I tried it before with div boxes but failed because of the need of
    >> vertical align images.


    > There's a demo of what you can do with tidier code (saving about 39%
    > code for the main image-displaying section) at:
    > http://garyjones.co.uk/development/herman.html
    >
    > When I left it a couple of hours ago though, the print preview for IE
    > was completely screwed, and in trying to fix it, think I screwed FF
    > too. Although it doesn't answer your original problem, ignoring any
    > CSS that deals with printing, the example is an alternative structure
    > to your page.
    >
    >>> I think
    >>> the problem is 2-fold.
    >>> 1) ISTR that IE has a problem with printing floated elements, so
    >>> de-float them when you come to print. Add the following to your CSS:
    >>>
    >>> @media print {
    >>> table.image { float: none; }
    >>> }

    >
    > OK, total crap - whoever wrote that deserves to be incarcerated. What
    > I think this moron was refering to can be found in the 7th paragraph
    > of http://www.alistapart.com/articles/goingtoprint/ . Having tried my
    > suggestion myself, I can see what utter tosh this help was. Ignore it,
    > as it won't help your original problem in the slightest.


    Well, it's an interesting alternative. Problems however with increasing the
    font size.
    Thanks again!

    --
    Nico
    http://www.nicoschuyt.nl
    Nico Schuyt, May 6, 2005
    #5
  6. Nico Schuyt

    Gazza Guest

    Nico Schuyt mumbled the following on 06/05/2005 16:57:

    > Well, it's an interesting alternative. Problems however with increasing the
    > font size.


    Could you be more specific?

    --
    Gazza
    Mobile Number Network Checker - http://mnnc.net/
    Creative writing & Poems - http://garyjones.co.uk/
    Leovanna Leonbergers - http://leovanna.co.uk/
    Gazza, May 6, 2005
    #6
  7. Nico Schuyt

    Nico Schuyt Guest

    Gazza wrote:
    > Nico Schuyt mumbled the following on 06/05/2005 16:57:
    > [http://garyjones.co.uk/development/herman.html]


    >> Well, it's an interesting alternative. Problems however with
    >> increasing the font size.


    > Could you be more specific?


    Well, see what happens in IE on View->Font size -> Large
    Advantage of the table approach is that the images keep their place (and is
    probably easier to mix different formats of images)


    --
    Nico
    http://www.nicoschuyt.nl
    Nico Schuyt, May 6, 2005
    #7
  8. Nico Schuyt

    Nico Schuyt Guest

    Nico Schuyt wrote:
    > I built a gallery with two-cell tables (based on
    > http://www.cs.tut.fi/~jkorpela/www/captions.html)
    > Perfect on screen but a mess on printing (IE6; Slightly better in
    > FireFox)


    > A basic example on http://www.hermansmith.nl/p_print.htm
    > (No need to print on paper. The preview is enough)


    Maybe I found a solution (at least in IE6):
    http://www.hermansmith.nl/p_print2.htm
    The tric seems to be to stop the floating of the tables at the end of the
    page.

    --
    Nico
    http://www.nicoschuyt.nl
    Nico Schuyt, May 6, 2005
    #8
    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. David Elliott

    Need Help with Thumbnail Gallery in Panel

    David Elliott, Oct 18, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    315
    Rick Strahl [MVP]
    Oct 18, 2003
  2. umberto
    Replies:
    0
    Views:
    400
    umberto
    Nov 18, 2003
  3. John

    OT: Picture Gallery

    John, Jan 2, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    431
  4. Eran Kampf

    Gallery application

    Eran Kampf, Sep 30, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    367
    Eran Kampf
    Sep 30, 2004
  5. Gallery Javascript Problem

    , Oct 19, 2005, in forum: Javascript
    Replies:
    1
    Views:
    66
    web.dev
    Oct 19, 2005
Loading...

Share This Page