Forum Moderators: not2easy
<style type="text/css" media="print">
<!--
.dontPrintMe {
overflow: hidden;
visibility: hidden;
display: none;
}
body {overflow:hidden;}
-->
</style>
<script type="text/javascript">
<!--
if (window.print) {
document.write("<a href='javascript:window.print();'>Print This Timetable!</a>");
}
//-->
</script>
<noscript>Printing this page will automatically print just the timetable.</noscript>
The major problem with this is that the closing of the div class="DontPrintMe" upsets the page.
The table to be printed is at the bottom of the page. So the DontPrintMe area stretches from <body> to the table. The </div> placed here, ends the layout for the page, rather than to close the DontPrintMe area.
I suppose there is no other way to close the DontPrintMe area.? Cheers
Without seeing the code, it would be hard to troubleshoot. What I can tell you is that I have a page with this structure that works perfectly:
<body>
<div class="dontPrintMe">
...bunch of stuff...
</div>
<div class="printMe">
...bunch of stuff...
</div>
</body>
The .printMe class has no special rules for printing (other than fixed width).
Yes, I suspect you are right. Both dreamweavers I work with tend to be temperamental. When things don't work one way, I often try to find an alternative - rather than have it crash about the ungraceful ears.
What I did was to put the timetables onto a 'printer friendly page' which in this case is a euphemism for a page with almost nothing but the timetables. It seems to be working well.
I've copied your advice and I will try this again the next time. Many thanks, Whoisgregg.