SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Location
    South Dakota
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Part of page not printing on first page

    Wow, this is a great community with a lot of information. I have been getting the Sitepoint newsletters, but have never taken the time to look at the forum. It seems that I'm always so busy.

    Any how, As I see that there are a lot of knowledgeable people here, I have a question about a problem printing a page. The following page is the one with the issue. All of the other pages on the site print as expected. (If you follow the links, you will not have the index1.php page, rather index.php and won't notice the printing)

    I am displaying this page with the print stylesheet that I wish to use. It displays just fine on the screen. The header and left gutter area display fine on the first print page. The issue is that the data itself does not display on the first page. I have tried to use page-break-before, page-break-after, and page-break-inside all set to avoid and it seems that there is some sort of hidden page break. I have taken out the gutter area and table and it still does not print on the first page.

    The page will print on the second printed page, then the third printed page it is not printing the images for the items in each row. When I do a print preview, it is basically the same in IE or FF. Any ideas, please let me know.

    I normally would not have put the table that holds the gutter and content area. In fact is was not there originally. The client wanted to windmill image at the bottom of the content and I didn't seem to find a way to do it using CSS that would work in FF.

    The client does want the navigation and other components in the gutter to show up in all pages against advise.

    I have tried searching these forums for this as well as many others and have been unable to find much of anything that works for printing that page.

    Thank you all in advance for any assistance that you can provide.

  2. #2
    Non-Member deathshadow's Avatar
    Join Date
    Jul 2006
    Location
    Dublin, NH
    Posts
    901
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you set a page-break-before on your first page, it will spew out an extra blank page at the start.

    If you have a page-break-after set on your first page, AND a page-break-before on the page after, you'll get a blank page in-between them.

    My advice:

    top of each 'page': page-break-before:auto;
    bottom of each 'page': page-break-after:always;

    should do the trick. You set both to always, it will always churn out a blank page between them.

    I could probably be more specific if you linked to a sample and/or included code here.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Location
    South Dakota
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    deathshadow,

    Thank you for your reply. Looking at it, my link was kind of buried and not obvious, the page is athttp://www.thecreeksedge.com/index1....breeding_stock and the style sheet is http://www.thecreeksedge.com/print.css .

    I had tired setting avoid as a global style for all element for all three page-break types. I had essed with orphans and widows (Don't even know if they have browser support) to see if maybe there was something there.

    As for trying to set the page breaks based on page, are you talking at the beginning and end of a full web page or where they would actually print? If it's where they would actually print, that's not as easy to determine as this page and the other one that has the problem are dynamic.

    I have tried just getting the part that's not printing right to print by removing parts of the page that show up before it, with no page-break reference anywhere.

    I will certainly try your suggestion at the beginning of the web page and at the end.

  4. #4
    Non-Member deathshadow's Avatar
    Join Date
    Jul 2006
    Location
    Dublin, NH
    Posts
    901
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    404 on your second links, but I figured out where they were.

    Quote Originally Posted by teddarling
    As for trying to set the page breaks based on page, are you talking at the beginning and end of a full web page or where they would actually print?
    Where they would actually print. If you set the page-breaks manually, it will break properly... assuming the client is printing on the same size paper with the same margins.

    You should probably create a print.css layed out entirely in in and pt (gives you a chance to strip unneccesary images so you're printer friendly), keeping in mind that a 'normal' page height is 11", and the 'common' default print margins varies run 0.5" for firefox, 0.75" for IE and 1.5" for Opera - and your CSS will have NO control over that.

    In your case, (looking at the page) if you set "itemDescription" to page-break-inside:avoid and page-break-outside:auto; that should make them line up on the print boundaries IF you kill the floats for the menus. (which I'd make display:none for the print CSS anyhow).

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Location
    South Dakota
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you deathshadow for your help in this. I have tried what you suggested to no avail. I have eliminated every part of the page except for the content that I want printed.

    Now if I set display:none on the h1 tag, it is set for printing fine for the first page, but even then, the second page doesn't print the images that are with the item. If the tag is there, then it makes the content below it print starting on the second page.

    Or, if I leave it display:none and add the header section, the content starts printing on the second page, and not right below it.

    I would love to create a page that just shows the content for printing. The problem is that my client wants the page to print as it looks on the screen. I've already made things narrower in an attempt to do all of this, and everything happens just on this and one other page. When I print all of the other pages on the site, they print just fine.

    I've tried to narrow this down as far as possible and it just doesn't seem to be working. This may be one of those places where the client is going to have to deal with things not printing as he wishes.

    If you have any further ideas, I welcome them. If not I would like to thank you again for your assistance.

    I have put the page back up with only the content in question if you would like to see how it looks now.


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
  •