Ugh! I had a little trouble when I finally went to test this out.
First of all, displaying and un-displaying rows and cells in a table is always a tricky task.
If your page is drawn dynamically and you know there is only one table cell you will want to print, perhaps you can do the following [notes below]:
Code:
<html>
<head>
<style media='print'>
[b]body *[/b] {
display:none;
}
.printMe {
display:block;
}
.centerMe {
margin-left:200px;
margin-right:200px;
[b] word-wrap:break-word;[/b]
}
</style>
[b]<style media='screen'>
.screenHide {
display:none;
}
</style>[/b]
</head>
<body>
<h1 class='printMe'>Hello, World!</h1>
<table width='100%' align='center'>
<tr>
<td>Cell A1: 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111</td>
<td>Cell A2: 22222222222222222222222222222222222222222222222222222222222222222222222222222222222222</td>
</tr>
<tr>
<td>Cell B1: 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333</td>
<td>Cell B2: 444444444444444444444444444444444444444444444444444444444444444444444444444444444444</td>
</tr>
</table>
[b]<span class='screenHide printMe centerMe'>Cell B2: 444444444444444444444444444444444444444444444444444444444444444444444444444444444444</span>[/b]
</body>
</html>
Notice that I changed the style sheet of type MEDIA='PRINT' to only hide those tags that are children to the BODY tag. That was important.
Notice, too, that the desired content for printing is repeated inside of a SPAN tag which, itself, is OUTSIDE of the TABLE. This SPAN tag is hidden from screen view (in a separate STYLE heading with MEDIA='SCREEN'), but displayed in the printout.
Finally, notice the update to the ".centerMe" class where I've added the word-wrap style.
Copy and paste the above into a textpad document and try it out.
'hope this helps!
--Dave
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
O Time, Strength, Cash, and Patience! ![[infinity] [infinity] [infinity]](/data/assets/smilies/infinity.gif)