By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,636 Members | 1,693 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,636 IT Pros & Developers. It's quick & easy.

Print preview / printing screwed up in IE but not in Mozilla / Firefox- Whazzup??

P: n/a
I'm helping on a web site, and it's got our knickers in a knot. We're
using the same basic CSS files (with mods) and same headers as from our
other sites, but the "print preview" won't work correctly on this site.

The site is here: http://askdrray.kabis.net (temporary location)

The site is being worked on, and only the front page works right now.
Expect constant changes. Ignore everything “below the fold”, as the
links there are not correct yet.

The CSS is broken up into four main files: a general one, for
device-independent CSS, one for Screen, one for Mobile devices (phones,
pda's) and one for printing.

For some strange reason, IE doesn't want to follow or even obey the
instructions inside the print css file. Many elements that should be
gone in the print version still appear. Why? Everything works fine in
Mozilla/Firefox - use that to see things as it should appear.

In order to flag elements in a very customizable way, we have created
six classes that exist in each of the three secondary files: printshow,
printhide, screenshow, screenhide, handshow handhide. Each class in each
css file contains code that will "handle" any element in the right way
for that particular case. For example, the print.css file would normally
have something like this:
.printhide { display: none; }
.screenshow { display: none; }
.printshow { display: inline;}
and yet IE still displays the elements that have class="printhide" or
class="screenshow" in a print preview or in a print output, when in fact
it should not. This is where we are scratching out heads. We must me
missing something really simple and stupid.

Also, a quick accessibility check (with Jaws) would be appreciated. How
does the site work for the disabled??

TIA
...Geshel
--
************************************************** ********************
My reply-to is an automatically monitored spam honeypot. Do not use it
unless you want to be blacklisted by SpamCop. Please reply to my first
name at my last name dot org.
************************************************** ********************
Jul 26 '05 #1
Share this Question
Share on Google+
16 Replies


P: n/a
Neo Geshel wrote:
I'm helping on a web site, and it's got our knickers in a knot. We're
using the same basic CSS files (with mods) and same headers as from our
other sites, but the "print preview" won't work correctly on this site.

There are a lot of validation errors. Perhaps fixing those might help.
Also, since you have "IE7 enhanced" at the bottom, which IE are you using?
IIRC IE6 also does not appreciate "<?xml ...>" at all. It puts IE into
Quirks mode.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 26 '05 #2

P: n/a
Jim Moe wrote:
Neo Geshel wrote:
I'm helping on a web site, and it's got our knickers in a knot. We're
using the same basic CSS files (with mods) and same headers as from
our other sites, but the "print preview" won't work correctly on this
site.

There are a lot of validation errors. Perhaps fixing those might help.
Also, since you have "IE7 enhanced" at the bottom, which IE are you
using?
IIRC IE6 also does not appreciate "<?xml ...>" at all. It puts IE into
Quirks mode.

the xml statement is required by the w3c recommendations for xhtml 1.0/1.1
Jul 26 '05 #3

P: n/a
Jedi Fans:
the xml statement is required by the w3c recommendations for xhtml 1.0/1.1


No, it's not. Why don't such rumours just die?
Jul 26 '05 #4

P: n/a
Jim Moe wrote:
Neo Geshel wrote:
I'm helping on a web site, and it's got our knickers in a knot. We're
using the same basic CSS files (with mods) and same headers as from
our other sites, but the "print preview" won't work correctly on this
site.

There are a lot of validation errors. Perhaps fixing those might help.
Also, since you have "IE7 enhanced" at the bottom, which IE are you
using?
IIRC IE6 also does not appreciate "<?xml ...>" at all. It puts IE into
Quirks mode.


I've replaced <iframe /> with <object /> to bring in the ads, and
everything validates now.

Incidentally, doing so causes bad scrollbars in IE, but I've managed to
get that problem licked. Turns out that with anything other than a flash
file, IE considers an <object /> to be bringing in another window. What
I mean by that is, try bringing in an image using <object />, and then
look at the raw image in IE (when you reference it directly, *not*
through a web page). Both pad the image by the same amount. This is the
same no matter what you bring in using <object />, except for flash
files (which I believe "trick" IE's <object /> tag into thinking that
the flash file is a web page with <body style="border: 0px; margin: 0px;
padding: 0px;" />, so that there is no padding).

What works is, if you are using CGI, such as PHP, ASP, ASP.NET or any
other server-side language. You simply reference a CGI page with the
object tag, and pass on to the CGI page appropriate variables that allow
the CGI page to retrieve the appropriate files (be they images or other
content!!). And to get rid of the scrollbars for the <object /> tag?
Simply use <body style="border: 0px; margin: 0px; padding: 0px;"
scroll="no"> in the CGI page that it references.

Neato!

Now, howzabout focusing on what I asked for, mainly how to get IE's
print output / print preview as nice as that of Mozilla / Firefox...

....Geshel
--
************************************************** ********************
My reply-to is an automatically monitored spam honeypot. Do not use it
unless you want to be blacklisted by SpamCop. Please reply to my first
name at my last name dot org.
************************************************** ********************
Jul 27 '05 #5

P: n/a
Jedi Fans wrote :
Jim Moe wrote:
Neo Geshel wrote:
I'm helping on a web site, and it's got our knickers in a knot. We're
using the same basic CSS files (with mods) and same headers as from
our other sites, but the "print preview" won't work correctly on this
site.

There are a lot of validation errors. Perhaps fixing those might help.
Also, since you have "IE7 enhanced" at the bottom, which IE are you
using?
IIRC IE6 also does not appreciate "<?xml ...>" at all. It puts IE
into Quirks mode.

the xml statement is required by the w3c recommendations for xhtml 1.0/1.


"An XML declaration is not required in all XML documents; however XHTML
document authors are strongly encouraged to use XML declarations in all
their documents."
http://www.w3.org/TR/2002/REC-xhtml1-20020801/#strict
Strongly encouraged but not required. As mentionned by others, the XML
declaration prevents MSIE 6 from being triggered into web standards
compliant rendering mode. So for best cross-browser compatibility, it is
preferable to avoid declaring the XML declaration.

Grard
--
remove blah to email me
Jul 27 '05 #6

P: n/a
Grard Talbot wrote:
the xml statement is required by the w3c recommendations for xhtml 1.0/1.


"An XML declaration is not required in all XML documents; however XHTML
document authors are strongly encouraged to use XML declarations in all
their documents."
http://www.w3.org/TR/2002/REC-xhtml1-20020801/#strict
Strongly encouraged but not required. As mentionned by others, the XML
declaration prevents MSIE 6 from being triggered into web standards
compliant rendering mode. So for best cross-browser compatibility, it is
preferable to avoid declaring the XML declaration.

Grard
--
remove blah to email me

as i corrected myself earlier on in the thread...
Jul 27 '05 #7

P: n/a
Neo Geshel wrote:

Now, howzabout focusing on what I asked for, mainly how to get IE's
print output / print preview as nice as that of Mozilla / Firefox...

I cannot find what causes the problem.
This might help, though:
When IE loads the page from a local copy, print preview works as expected.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 27 '05 #8

P: n/a
Jim Moe wrote:
Neo Geshel wrote:

Now, howzabout focusing on what I asked for, mainly how to get IE's
print output / print preview as nice as that of Mozilla / Firefox...

I cannot find what causes the problem.
This might help, though:
When IE loads the page from a local copy, print preview works as
expected.


Like, the print preview looks *exactly* (or nearly the same as) the
print preview from Firefox?? I've designed it so that the only things
that should be printed out are the title of the page (in text, and not
as the banner across the top of the page), and the body of the web page.
The top ad, the left side (incl. navigation), the right side (with ads)
and the bottom ad should not show up at all in the print preview. As
well, the content and the title should span the width of the page
without going over.

TIA
....Geshel
--
************************************************** ********************
My reply-to is an automatically monitored spam honeypot. Do not use it
unless you want to be blacklisted by SpamCop. Please reply to my first
name at my last name dot org.
************************************************** ********************
Jul 28 '05 #9

P: n/a
Neo Geshel wrote:
This might help, though:
When IE loads the page from a local copy, print preview works as
expected.


Like, the print preview looks *exactly* (or nearly the same as) the
print preview from Firefox??

Yes.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 28 '05 #10

P: n/a
Jim Moe wrote:
Also, since you have "IE7 enhanced" at the bottom, which IE are you
using?


Follow that link and see what you get. =) And no, it’s *not* about the
upcoming IE7...

...Geshel
--
************************************************** ********************
My reply-to is an automatically monitored spam honeypot. Do not use it
unless you want to be blacklisted by SpamCop. Please reply to my first
name at my last name dot org.
************************************************** ********************
Jul 29 '05 #11

P: n/a
Neo Geshel wrote:
Jim Moe wrote:
Neo Geshel wrote:
(snip) Like, the print preview looks *exactly* (or nearly the same as) the
print preview from Firefox?? I've designed it so that the only things
that should be printed out are the title of the page (in text, and not
as the banner across the top of the page), and the body of the web page.
The top ad, the left side (incl. navigation), the right side (with ads)
and the bottom ad should not show up at all in the print preview. As
well, the content and the title should span the width of the page
without going over.


Which is exactly what I see with IE 6.0. And the printed output agrees
(which isn't always true with IE...).

I do see a problem, however. With the Text Size set to Medium in the
browser, the Print Preview folds the title onto two lines, with the
words "Your Monthly Health Newsletter!" on the second line. It then
puts the word "Welcome" right over this second line, leaving only the
tops of the tallest letters in that second line visible.

Chris Beall

Jul 29 '05 #12

P: n/a
Neo Geshel wrote:
Jim Moe wrote:
Also, since you have "IE7 enhanced" at the bottom, which IE are you
using?

Follow that link and see what you get. =) And no, it’s *not* about the
upcoming IE7...

...Geshel


Neo,

Are you sure? It seems to work the same way; the throbber keeps
spinning, but nothing else happens....

Chris Beall

Jul 29 '05 #13

P: n/a
Chris Beall wrote:
Neo Geshel wrote:
Jim Moe wrote:
Neo Geshel wrote:

(snip)
Like, the print preview looks *exactly* (or nearly the same as) the
print preview from Firefox?? I've designed it so that the only things
that should be printed out are the title of the page (in text, and not
as the banner across the top of the page), and the body of the web
page. The top ad, the left side (incl. navigation), the right side
(with ads) and the bottom ad should not show up at all in the print
preview. As well, the content and the title should span the width of
the page without going over.

Which is exactly what I see with IE 6.0. And the printed output agrees
(which isn't always true with IE...).

I do see a problem, however. With the Text Size set to Medium in the
browser, the Print Preview folds the title onto two lines, with the
words "Your Monthly Health Newsletter!" on the second line. It then
puts the word "Welcome" right over this second line, leaving only the
tops of the tallest letters in that second line visible.

Chris Beall


That is very strange, because with IE on several computers that I have,
it shows all of the images, ads and the nav menu, which it shouldn't.
This is in direct contradiction to the print css that I have set up.

Could you please post a screenshot of your print preview, complete with
browser menu and everything? Thanks.

....Geshel
--
************************************************** ********************
My reply-to is an automatically monitored spam honeypot. Do not use it
unless you want to be blacklisted by SpamCop. Please reply to my first
name at my last name dot org.
************************************************** ********************
Jul 30 '05 #14

P: n/a
Neo Geshel wrote:
Chris Beall wrote:
Neo Geshel wrote:
Jim Moe wrote:

Neo Geshel wrote:


(snip)

That is very strange, because with IE on several computers that I have,
it shows all of the images, ads and the nav menu, which it shouldn't.
This is in direct contradiction to the print css that I have set up.

Could you please post a screenshot of your print preview, complete with
browser menu and everything? Thanks.

...Geshel


Neo,

Yep. http://pages.prodigy.net/chris_beall...ique/DrRay.gif

BUT, I got this result with ActiveX controls disabled, which is the way
I normally run. If I ENable ActiveX, I instead get...a blank page
(except for a browser-inserted "Page 1 of 2" at the top of the page.

I suspect the IE7 plugin is what is causing you the grief, but that's
just a guess.

BTW, this page takes a LONG time to load on a 56Kb line.

Chris Beall

Jul 30 '05 #15

P: n/a
Chris Beall wrote:
Neo Geshel wrote:
Chris Beall wrote:
Neo Geshel wrote:

Jim Moe wrote:

> Neo Geshel wrote:
(snip)

> That is very strange, because with IE on several computers that I have,

it shows all of the images, ads and the nav menu, which it shouldn't.
This is in direct contradiction to the print css that I have set up.

Could you please post a screenshot of your print preview, complete
with browser menu and everything? Thanks.

...Geshel

Neo,

Yep. http://pages.prodigy.net/chris_beall...ique/DrRay.gif

BUT, I got this result with ActiveX controls disabled, which is the way
I normally run. If I ENable ActiveX, I instead get...a blank page
(except for a browser-inserted "Page 1 of 2" at the top of the page.

I suspect the IE7 plugin is what is causing you the grief, but that's
just a guess.

BTW, this page takes a LONG time to load on a 56Kb line.

Chris Beall


Thanks for the screenshot. The IE7 plugin is in several other sites that
we have created, and it's never had an effect like this before. All IE7
is, is a set of JS scripts designed to force IE to render content the
way that the standards meant the content to be rendered, that's all.

As well, this is currently on our development server. As such, there is
ZERO caching involved, and caching is even forcibly disabled on the
client's end. This will end once the site moves to the production
server, and then only the first page launched will take time (to load
IE7). Once IE7 is loaded, subsequent pages should be pretty quick (since
IE7 will be cached on the client's computer).

....Geshel
--
************************************************** ********************
My reply-to is an automatically monitored spam honeypot. Do not use it
unless you want to be blacklisted by SpamCop. Please reply to my first
name at my last name dot org.
************************************************** ********************
Jul 31 '05 #16

P: n/a
Neo Geshel wrote:
Chris Beall wrote:
Neo Geshel wrote:
(snip) Thanks for the screenshot. The IE7 plugin is in several other sites that
we have created, and it's never had an effect like this before. All IE7
is, is a set of JS scripts designed to force IE to render content the
way that the standards meant the content to be rendered, that's all. (snip) ...Geshel


Neo,

FYI, folks here often comment about the hazard of assuming JavaScript
will be enabled on a given user system. They estimate (I've no idea
how) that about 15% of users have it switched off. I don't know what
effect that would have on IE7-reliant pages...

Chris Beall

Aug 1 '05 #17

This discussion thread is closed

Replies have been disabled for this discussion.