I had the same issue with IE not supporting background printing.
So, I created 2 divs, one div had a higher Z and had text content. The second div was just behind the front of the div, but with a lower Z index and had an image (img not a background image) for a width and height of 100%. Therefore, when I showed 2 divs together, it looked like one div because they overlapped perfectly. When I print in the IE browser, it displays with the image because the image is not a background image, but a regular img tag that fills the bottom div.
some code.
<div id="survey" class="surveyResponseWindow" style="display:none;">Please logout and re-login, because your session has expired.</div> <div id="surveyBackground" class="surveyBackgroundDiv" style="display:none;"> <img src="/rsm/jsp/public/images/contentGrad.gif" width="100%" height="100%" /> </div> <script language="javascript" type="text/javascript"> function showSurvey(surveyResponseId) { var e = document.getElementById("survey"); var bkgd = document.getElementById("surveyBackground"); var focusinput = document.getElementById('focusinput'); var nh = 'data-nohide'; if (e.style.display=='none') { e.style.display='block';</script>
in CSS put this
.surveyResponseWindow { width:500px; height:600px; z-index: 2; position: absolute; top:100px; left:150px; border:1px solid #AAAAAA; border-bottom-left-radius:10px; border-bottom-right-radius:10px; border-top-left-radius:10px; border-top-right-radius:10px; box-shadow: -1px 7px 15px -2px #000; } .surveyBackgroundDiv { z-index: 1; position: absolute; top:100px; left:150px; width:500px; height:600px; border:1px solid #AAAAAA; border-bottom-left-radius:10px; border-bottom-right-radius:10px; border-top-left-radius:10px; border-top-right-radius:10px; box-shadow: -1px 7px 15px -2px #000; }
Nigel Heywood Jan 13 '14 at 20:59 2014-01-13 20:59
source share