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

Discussion in 'HTML' started by Neo Geshel, Jul 26, 2005.

  1. Neo Geshel

    Neo Geshel Guest

    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.
    **********************************************************************
     
    Neo Geshel, Jul 26, 2005
    #1
    1. Advertising

  2. Neo Geshel

    Jim Moe Guest

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

    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)
     
    Jim Moe, Jul 26, 2005
    #2
    1. Advertising

  3. Neo Geshel

    Jedi Fans Guest

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

    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
     
    Jedi Fans, Jul 26, 2005
    #3
  4. Re: Print preview / printing screwed up in IE but not in Mozilla/Firefox - Whazzup??

    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?
     
    =?ISO-8859-1?Q?Christoph_P=E4per?=, Jul 27, 2005
    #4
  5. Neo Geshel

    Jedi Fans Guest

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

    Christoph Päper wrote:
    > 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?

    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."
     
    Jedi Fans, Jul 27, 2005
    #5
  6. Neo Geshel

    Ben Measures Guest

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

    Christoph Päper wrote:
    > 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?


    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,
    --
    Ben M.
     
    Ben Measures, Jul 27, 2005
    #6
  7. Neo Geshel

    Neo Geshel Guest

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

    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.
    **********************************************************************
     
    Neo Geshel, Jul 27, 2005
    #7
  8. Re: Print preview / printing screwed up in IE but not in Mozilla/Firefox - Whazzup??

    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.

    Gérard
    --
    remove blah to email me
     
    =?ISO-8859-1?Q?G=E9rard_Talbot?=, Jul 27, 2005
    #8
  9. Neo Geshel

    Jedi Fans Guest

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

    Gérard 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.
    >
    > Gérard
    > --
    > remove blah to email me

    as i corrected myself earlier on in the thread...
     
    Jedi Fans, Jul 27, 2005
    #9
  10. Neo Geshel

    Jim Moe Guest

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

    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)
     
    Jim Moe, Jul 27, 2005
    #10
  11. Neo Geshel

    Neo Geshel Guest

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

    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.
    **********************************************************************
     
    Neo Geshel, Jul 28, 2005
    #11
  12. Neo Geshel

    Jim Moe Guest

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

    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)
     
    Jim Moe, Jul 28, 2005
    #12
  13. Neo Geshel

    Andy Dingley Guest

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

    On Tue, 26 Jul 2005 23:56:48 GMT, Ben Measures
    <> wrote:

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


    Your quote is misleading.

    >> Such a declaration is required when the
    >> character encoding of the document is other than the default UTF-8 or
    >> UTF-16.


    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.
     
    Andy Dingley, Jul 28, 2005
    #13
  14. Neo Geshel

    Neo Geshel Guest

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

    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.
    **********************************************************************
     
    Neo Geshel, Jul 29, 2005
    #14
  15. Neo Geshel

    Chris Beall Guest

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

    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
     
    Chris Beall, Jul 29, 2005
    #15
  16. Neo Geshel

    Chris Beall Guest

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

    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
     
    Chris Beall, Jul 29, 2005
    #16
  17. Neo Geshel

    Neo Geshel Guest

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

    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.
    **********************************************************************
     
    Neo Geshel, Jul 30, 2005
    #17
  18. Neo Geshel

    Chris Beall Guest

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

    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/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
     
    Chris Beall, Jul 31, 2005
    #18
  19. Neo Geshel

    Neo Geshel Guest

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

    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/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.
    **********************************************************************
     
    Neo Geshel, Jul 31, 2005
    #19
  20. Neo Geshel

    Chris Beall Guest

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

    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
     
    Chris Beall, Aug 2, 2005
    #20
    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. Richard

    screwed up in mozilla why?

    Richard, Jan 6, 2004, in forum: HTML
    Replies:
    3
    Views:
    404
    Richard
    Jan 6, 2004
  2. Replies:
    2
    Views:
    477
  3. Replies:
    0
    Views:
    1,003
  4. Matt
    Replies:
    1
    Views:
    280
    Randy Webb
    Nov 20, 2004
  5. Guilherme Oliveira

    print() works in mozilla but not in IE ?!?!

    Guilherme Oliveira, Jan 31, 2005, in forum: Javascript
    Replies:
    1
    Views:
    89
    Mick White
    Feb 2, 2005
Loading...

Share This Page