SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard
    Join Date
    May 2002
    Posts
    1,370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Div printing - more than single page content

    On a two col div, whenever the content of the .colmain (main) left side div happens to run greater than a single page -- printing the page in both FF and IE7 -- the first page comes up blank. How is the content shoved to the top?
    Code:
    .colmain { 
    line-height: 125%;
    float: left;
    position: relative;
    width: 70%;
    height: 95%; 
    left: 2%;
    margin: 3px 3px 15px 3px;
    }

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,477
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    You can't rely on floats being printed as they look on screen and for printed output you should really set all floats to display block and use a linear type layout.

    Unfortunately printed output is still the most problematic of all CSS rules and there are many bugs and browser differences to contend with. The best solution is to simplify the output into something simple. Remove all floats and positioning and overflow properties and most of the widths of the containers as paper isn't the same size as the screen.

    However, I'm not getting any blank pages using your code above and adding another right float into the mix. You may need to provide a working example for us to debug properly. Make sure that any containers are not set to overflow:hidden when printed as that often causes blank pages in Firefox.

  3. #3
    SitePoint Wizard
    Join Date
    May 2002
    Posts
    1,370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Only when there is content beyond (1) page does both browsers push the 1st page blank. Strange.

    I would like to have this for site visitors but right now I'm printing newly developed pages for their 1st use.

    To bypass the browsers I tried Snagit, which I like (Scrolling Window), but it doesn't provide the url and date

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,477
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by datadriven View Post
    Only when there is content beyond (1) page does both browsers push the 1st page blank. Strange.
    Yes, I set up an example like that and in the basic form it was working fine for me which makes me think there may be something else causing it although I can see how if one float stretches to another page that would confuse printed output. Firefox will often print a blank page when a container has overflow:hidden applied so it may be your float clearing technique.

    Try a cut down version of the page and see if you can isolate the problem. As I said above I have two floats using your code and its working for me but I don't doubt that you are having problems as I rarely see print stylesheets working properly unless they are completely simplified.


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
  •