I have a web page in which I want to print the content of tables, textarea, input text fields, BUT I DON'T WANT TO PRINT THE BUTTON LIKES SUBMIT, CANCEL ETC.
Is it possible to achieve this effect using CSS ?
Not with pure CSS alone,
Not with pure CSS alone, thanks to stupid IE.
input[type="submit"] {display: none;}
in a print stylesheet would do what you want. However IE won't support that, so use HTML like:
.noprint {display: none;}
i would think so.
i would think so.
try giving your Submit, Cancel, etc buttons a class such as "button" or something.
Then in your print css document just do
.button {
display: none;
}
EDIT: Thanks for c**k blocking me TPH
Clarification
Thanks for the tip. However, I mis-stated my intention.
I want to display the buttons on the web page, but when I print (css, media="print"), I don't want the buttons printed.
I can change the display property of buttons to "none" when I print, then have to reset the display property to normal after I print. All
requires Javascript.
Is it possible to achieve the same effect w/o Javascript and use CSS alone ? Thkx
I got it
This is, I guess, what you guys hinted. I have a class button and in print css, set the display to none and it works. Thanks
< style type="text/css" media="print" >
div#tbl-container { overflow: visible; }
.reportTable tbody { overflow: visible; }
.button { display: none; }
< /style >
PS"
Spaces inside style tags purposely created to retain the code when sbumit
what blocking? Generally
what blocking?
Generally I would have a class of some description on input submits and most form controls, using those existing classes should be sufficient to place a display:none on in a print style sheet.
you stated it clearly and we
you stated it clearly and we both posted the same thing
you should do research on print style sheets
(hint: you're going to have two stylesheets)
That's what we were hinting
That's what we were hinting towards, yes