I am sorry if this is addressed somewhere already but I cant find it.

I have read a lot about using a print stylesheet. I understand that and it sounds like a great plan.

However I cannot find any information about how to actually make the call to print a certain table or form. I dont want to print out the whole webpage, just a form that someone has filled out to print to there machine.

I am assuming that because I cannot find anything about this that I am just really dumb :( and can fully accept that.

Any help would be greatly appreciated.

James

To be honest i have no idea but i would guess that in the print stylesheet you would 'hide' all elements apart from the ones you want to print out

setting display:hidden should work on most things. Also you should change your font, background image / colour and text colour to suit a printer.

Hope that helps...

what emhmk wrote
except set display:none; display hidden leaves whitespace where the element would be

<html><head><style type='text/css'>
@media print {  .dontprint { display:none; } }
@media screen { .dontshow { display:none; } }
</style></head><body>
<p class='dontprint'>this paragraph only displays onscreen</p>
<p class='dontshow'> this paragraph provides alternate text in the printed version but does not show onscreen</p>
<p> this paragraph both displays and prints, the form would go inside here</p>
<p class='dontprint'>this paragraph only displays onscreen</p>
<p class='dontshow'> this paragraph provides alternate text in the printed version but does not show onscreen</p>
</body></html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.