Problem with printing gallery

G

Gazza

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.
 
N

Nico Schuyt

Gazza said:
Nico Schuyt mumbled the following on 06/05/2005 08:14:
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!
 
G

Gazza

Nico Schuyt mumbled the following on 06/05/2005 10:47:
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.

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.
 
N

Nico Schuyt

Gazza said:
Nico Schuyt mumbled the following on 06/05/2005 10:47:
Usually I'd agree, but in this case, I'd tend towards another of his
suggestions.
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.


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!
 
G

Gazza

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?
 
N

Nico Schuyt

N

Nico Schuyt

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top