473,387 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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
16 11407
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rob McLennan - ZETLAND | last post by:
Hi, I have set up an external stylesheet, named "print.css", to format the style of all pages printed from my company's website. I've been previewing my changes to the stylesheet by doing...
24
by: Rhino | last post by:
I am dabbling with print CSS for the first time and I need some guidance. The web pages on my site look fine - to my untrained eye - when displayed on the monitor in any of the standard browsers....
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
4
by: zz | last post by:
Sorry for posting this here but unfortunatly I couldn't find any appropriate newsgroup for this and since I've been active here with .net question I figured you guys might be able to help. ...
6
by: CSharpguy | last post by:
In my gridview I have 2 -3 template fields which are hyperlinks. I allow the user to print this grid. When the grid prints it also prints the links, how can I take the user to a print preview page...
9
by: igotyourdotnet | last post by:
I need to create a print preview page BUT my page I need to print has a grid and in the grid I have 2 or 3 columns that have links I want to hide the columns with the links on my print preview page...
2
by: Brad Pears | last post by:
I have some sample code that uses the print dialog, print preview and a print direct options. If I select print preview and then click the printer icon from that, the document prints. If I...
2
by: Brad Pears | last post by:
I have a vb.net 2005 application and am using the print preview screen. This screen has a printer icon on it that the user can use to print the document currently being viewed. It uses the default...
1
by: mailjaneen | last post by:
Hello, can someone help me. I want to display some fields on a report in print preview (i.e. instructions), that I don't want to print to the printer or export to file. I can't seem to find any...
3
by: Dan | last post by:
Hi, This may be the wrong place to ask this question, but here goes anyway. I have a RIA that I developed so that there is a scrollable div in the bottom right portion of the screen that always...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.