Ever wonder how that scroll bar is being removed while trying to print/print preview a page with scroll bar in it? Below is the screenshot.
As you can see above, some data are being trimmed-off because of the height restriction defined on the container(<div></div>)
Using the CSS:
By using the CSS, we can eliminate that scrollbar and print the whole page without worrying the layout.
<style type="text/css">
.text {width: 500px;}
.text1 {width: 500px;height: 200px;overflow: auto;border: 1px solid #ccc;}
@media print {.text1 {height: auto;overflow: none;}}
</style>
I hope this will help you guys.

0 comments:
Post a Comment