function printDiv(printpage) { var ...">

Stretch div when printing

I have the following function that works great.

<script type="text/javascript">
function printDiv(printpage)
{
var headstr = "<html><head><title></title></head><body>";
var newstr = document.all.item(printpage).innerHTML;
var oldstr = document.body.innerHTML;
document.body.innerHTML = headstr+newstr;
window.print();
document.body.innerHTML = oldstr;
return false;
}
</script>

However, my div is about half the size of the paper. Is there a way to make my div stretch to full paper when calling a function?

0
source share

All Articles