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

N

Neo Geshel

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.
**********************************************************************
 
J

Jim Moe

Neo said:
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.
 
J

Jedi Fans

Jim said:
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
 
?

=?ISO-8859-1?Q?Christoph_P=E4per?=

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

Jedi Fans

Christoph said:
Jedi Fans:

No, it's not. Why don't such rumours just die?
ok fair enough:

"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. Such a declaration is required when the character
encoding of the document is other than the default UTF-8 or UTF-16 and
no encoding was determined by a higher-level protocol. Here is an
example of an XHTML document. In this example, the XML declaration is
included."
 
B

Ben Measures

Christoph said:
Jedi Fans:


No, it's not. Why don't such rumours just die?

Because as with all good rumours, it's not completely false.

Excerpt from http://www.w3.org/TR/xhtml11/conformance.html :
Here is an example of an XHTML 1.1 document.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>Virtual Library</title>
</head>
<body>
<p>Moved to <a href="http://vlib.org/">vlib.org</a>.</p>
</body>
</html>

Note that in this example, the XML declaration is included. An XML
declaration like the one above is not required in all XML documents.
XHTML document authors are strongly encouraged to use XML declarations
in all their documents. Such a declaration is required when the
character encoding of the document is other than the default UTF-8 or
UTF-16.

Regards,
 
N

Neo Geshel

Jim said:
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.
**********************************************************************
 
?

=?ISO-8859-1?Q?G=E9rard_Talbot?=

Jedi Fans 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.

Gérard
 
J

Jedi Fans

Gérard Talbot said:
"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.

Gérard
as i corrected myself earlier on in the thread...
 
J

Jim Moe

Neo said:
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.
 
N

Neo Geshel

Jim said:
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.
**********************************************************************
 
A

Andy Dingley

Because as with all good rumours, it's not completely false.

Your quote is misleading.

You trimmed
: and no encoding was determined by a higher-level protocol.

So in the HTTP case, supply an encoding along with the content type and
you'll not need one.

I haven't used an XML prolog in an XHTML document since 1998, when I
discovered that Macs couldn't handle them. They were otherwise fine with
XHTML 1.0, subject to a little Appendix C, even back then.
 
N

Neo Geshel

Jim said:
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.
**********************************************************************
 
C

Chris Beall

Neo said:
(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
 
C

Chris Beall

Neo said:
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
 
N

Neo Geshel

Chris said:
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.
**********************************************************************
 
C

Chris Beall

Neo said:
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/alt.html.critique/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
 
N

Neo Geshel

Chris said:
Neo,

Yep. http://pages.prodigy.net/chris_beall/alt.html.critique/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.
**********************************************************************
 
C

Chris Beall

Neo said:
(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
 

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,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top