SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2005
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Print Css Problem

    Afternoon All

    We have a problem with our print.css.

    Using Firefox, and the following page as an example http://www.ja.net/services/dns/janet...r-service.html

    only the first page is printed.

    It works fine in ie7.

    I'm sorry for the barebones information, I'm sending this email on behalf of a colleague who has had to leave the office as her is having problems.

    Thanks very much for any help here

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Opera shows three pages in the print preview, but the left-hand side of the text is cut off. I didn't look at your print style sheet, but it doesn't appear to be quite right.

    On the other hand, the page is invalid (50 errors and a number of warnings). It's actually a perfect example of how serving XHTML markup as text/html can be harmful. That page would yield a big fat YSoD in Firefox if served as real XHTML.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Zealot
    Join Date
    Jun 2005
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply

    So would the invalid markup make the print css not work, or is that a separate problem that needs to be corrected in itself?

    Thanks

    Didcot84

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's hard to say. I had to leave for a meeting, and right now I'm on my way out of the office for the day. However, invalid markup should always be corrected before you start looking for presentational problems.

    Although contemporary browsers may render even valid documents differently, with invalid markup all bets are off. Of course, this depends on what sort of validation errors there are.

    If a document doesn't render correctly, your first thought should be, 'is the markup valid?' The next should be, 'is the CSS valid?' If the answer to both questions is yes, then you can start looking for browser bugs and quirks.
    Birnam wood is come to Dunsinane

  5. #5
    SitePoint Zealot
    Join Date
    Jun 2005
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The thing is mate, when you working with a cms and people across the company update markup, you cannot ensure that every page is validated, we can just make sure that our stylesheets, including the print stylesheet, are all correct and don't have any browser bugs, does that make sense?

  6. #6
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I fully understand. But if you can't ensure validity – or at the very least well-formedness – you definitely shouldn't use an XHTML doctype declaration.

    A good CMS, of course, would make sure that only valid markup was output. I know that most systems don't, since they are usually build on string juggling. (Also, software developers, for some reason, often pay little attention to web standards.)

    I'm currently developing the template framework for a new CMS at the office. We need to use a WYSIWYG editor for the publishers, but I've built a validator that won't let them save an article unless it's 100% valid (i.e., if the WYSIWYG editor messes up what they're writing).
    Birnam wood is come to Dunsinane

  7. #7
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,389
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    HI,

    In your print stylesheet add this following code:

    Code:
    #wrapper {height:auto!important;overflow:visible}
    That should do the trick

  8. #8
    SitePoint Zealot
    Join Date
    Jun 2005
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello Paul

    Thanks very much for this post, it has done the job, my colleague says she tried both of those separately but not together.

    Going back to what you were saying Tommy, please let us know about your cms, as we are investigating a new one as we speak.

    Its so hard, I created and delivered a home page and template content page with valid xhtml and css, but that has all gone down the pan now and it looks like all of our pages are incorrectly coded.

    Again, thanks for the help Paul, we've moved onto a deeper issue but you solved the original post.

  9. #9
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We use Polopoly, a Java-based CMS. You have full control over everything that's output. Essentially, it's a CM server plus a toolbox for building your own input/output templates.

    I had to write the validator myself, since there was nothing like that in the toolbox. We use the bundled FCKeditor, but I'm aware of another installation where they used XStandard instead.
    Birnam wood is come to Dunsinane

  10. #10
    SitePoint Zealot
    Join Date
    Jun 2005
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Tommy

    I'll take a look, thanks for the help to both of you


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •