Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing all contents of a scrollable div 1

Status
Not open for further replies.

mwa

Programmer
Jul 12, 2002
507
US
Hi all...
I've searched everywhere that I can think of and I can't figure this out:

How do I print the entire contents of a scrollable div???

Thanks in advance,
mwa
 
use CSS media type "print". view this in IE, then in print preview:

Code:
<html>
<head>
<style type=&quot;text/css&quot;>
#theDiv {
	border:1px solid black;
	height:50px;
	width:50px;
	overflow:hidden;
}

@media print {
	#theDiv {overflow:visible;}
}
</style>

</head>

<body>
<div id=&quot;theDiv&quot;>
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar
foo
 bar

</div>
</body>
</html>
=========================================================
if (!succeed) try();
-jeff
 
Thanks a bunch... That works great...

mwa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top