Click to See Complete Forum and Search --> : Remove buttons when print()


zerodyme1985
01-20-2007, 08:05 PM
Im trying to set up a button that will print the webpage without printing the buttons as well... is there a way to do this?

bathurst_guy
01-20-2007, 08:09 PM
Using CSS. I will move this to the CSS forum.

zerodyme1985
01-20-2007, 08:22 PM
Thanks for moving it to the right spot, wasnt sure about where to put it. Ok, now that we know it can be done with CSS, what would the coding look like.

bathurst_guy
01-20-2007, 08:51 PM
In the head section:<style type="text/css" media="print">
input {
display: none;
}
</style>This will hide all input fields (text, button, submit etc) You could also hide textareas and select drop-downs if you wanted:<style type="text/css" media="print">
input, textarea, select {
display: none;
}
</style>Or even the whole form:<style type="text/css" media="print">
form {
display: none;
}
</style>

zerodyme1985
01-20-2007, 10:24 PM
Thanks a bunch, bathurst! Instead of using the input, textarea, and select things (I only call them that, cause I cant remember what they are technically called), I just put the buttons in class="buttons" and changed them to .buttons. Again, THANKS A BUNCH!!! My brain just isnt working right lately.