Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Print css not printing all web pages in ie8

$
0
0

Hi All,

I am trying to print my web page(contains 4 pages) in ie8. When I click on print for the first time it prints 1st page only.

Second time when I click, it prints all other 3 pages(except 1st page). This is only happening in ie8(win 7 and win xp) machines.

It's working perfectly fine in ie9, chrome etc.

below is my css:

<style type="text/css">
 .ms-long
 {
  width: 100%;
  }
 
.ms-usereditor
   {
 width:180px;
}
 #DeltaTopNavigation, #ctl00_PlaceHolderLeftNavBar_PlaceHolderQuickLaunchBottom_idNavLinkViewAll
 {
display:none;
}
  #watermark
   {
 display:none;
   }     

#pageTitle {width:auto; word-wrap:break-word; white-space:normal !important; max-height:20px; }


@media print
{

    div#contentRow
{
    overflow:visible;
    padding-right: 30px;
}

    /* Remove unwanted elements */
    #DeltaSiteLogo, #s4-ribbonrow, #suiteBar, .ms-core-navigation, #searchInputBox, #DeltaPageStatusBar, #siteIcon
    {
        display: none;
    }
    .s4-titlerow
    {
        display: none;
        visibility: hidden;
    }
    .right-wp-zone-col
    {
        display: block;
        float: left;
    }

    /* Improve colour contrast of links */
    a:link, a:visited
    {
        color: #781351;
    }

    /* Format layout */
    .col-fluid-1
    {
        width: auto;
        margin: 0;
        float: none;
    }
    .col-fluid-2
    {
        width: 93%;
        margin: 0;
        float: none;
    }
   
    body {margin: 1cm;}

   
    /* Show "Print-only" content */
    #watermark
    {
        display: inline;
        float:left;
    }

  }

Print button:

<div id="printPage"><a href="javascript:window.print();"><img alt="Print" src="/_layouts/images/printerfriendly.gif" title="Print this page." />
     Print</a></div>


Viewing all articles
Browse latest Browse all 3527

Trending Articles