Guest_imported
New member
- Jan 1, 1970
- 0
Hi all!
I have a BAD problem!
The website I'm building is structured as a frameset containing an always-present top header frame (with nav bar) and a content-frame.
The stuff in the content frame is all enclosed in a <div class="contentCanvas"> element, styled with an external CSS, which forces the content in it to be scrolled when it reaches its maximum size.
DIV.contentCanvas {
background: #E5F4F5;
width: 650px;
height: 100%;
overflow: auto;
text-align: center;
}
Now, my problem is that I can not PRINT the full content of the content frame because the overflow property is not followed by the browser when printing!!!
So I have made a simple javascript in the nav bar (in the header frame) that says to print only the content frame, changing "that" CSS line:
<!-- BEGIN Print Content-Frame Script ----------->
<script language="JavaScript"><!--
function printit() {
var contentToPrint = parent.content;
contentToPrint.focus();
contentToPrint.document.styleSheets[0].rules[7].style.overflow='visible';
contentToPrint.print();
contentToPrint.document.styleSheets[0].rules[7].style.overflow='auto';
}
//-->
</script>
<!-- END Print Content-Frame Script ----------->
BUT THIS THING DOES NOT WORK!!!
Well, the stylesheet is modified but printing ignore it...
Note: if I do change manually the CSS setting overflow to visible, printing WORKS... but of course I lose the scroll-property for my texts...
The website I'm talking about is but I've modified only my local version for now...
Anything about this case?
Thanx, mcd
I have a BAD problem!
The website I'm building is structured as a frameset containing an always-present top header frame (with nav bar) and a content-frame.
The stuff in the content frame is all enclosed in a <div class="contentCanvas"> element, styled with an external CSS, which forces the content in it to be scrolled when it reaches its maximum size.
DIV.contentCanvas {
background: #E5F4F5;
width: 650px;
height: 100%;
overflow: auto;
text-align: center;
}
Now, my problem is that I can not PRINT the full content of the content frame because the overflow property is not followed by the browser when printing!!!
So I have made a simple javascript in the nav bar (in the header frame) that says to print only the content frame, changing "that" CSS line:
<!-- BEGIN Print Content-Frame Script ----------->
<script language="JavaScript"><!--
function printit() {
var contentToPrint = parent.content;
contentToPrint.focus();
contentToPrint.document.styleSheets[0].rules[7].style.overflow='visible';
contentToPrint.print();
contentToPrint.document.styleSheets[0].rules[7].style.overflow='auto';
}
//-->
</script>
<!-- END Print Content-Frame Script ----------->
BUT THIS THING DOES NOT WORK!!!
Well, the stylesheet is modified but printing ignore it...
Note: if I do change manually the CSS setting overflow to visible, printing WORKS... but of course I lose the scroll-property for my texts...
The website I'm talking about is but I've modified only my local version for now...
Anything about this case?
Thanx, mcd