Page 1 of 1
Changing css document without reloading page
Posted: Thu May 04, 2006 3:49 pm
by Luke
I am trying to make a "print this page" button on my invoices in MIVA merchant... I need to be able to change the css document without reloading the page, because reloading the page kills the session. Is this possible?
Posted: Thu May 04, 2006 3:55 pm
by feyd
You can specify a separate CSS file that is just for printing.
http://www.w3.org/TR/REC-CSS2/media.html
Posted: Thu May 04, 2006 4:24 pm
by Luke
I don't understand... is this what you do?
Code: Select all
<style type="text/css">
<!--
@import url(../css/master.css);
@import url(../css/printmaster.css) print;
-->
</style>
Posted: Thu May 04, 2006 4:26 pm
by feyd
Link tags are what I use.
Posted: Thu May 04, 2006 4:32 pm
by Luke
Holy smurf!! That's awesome. Works great!! Thanks man
Posted: Thu May 04, 2006 6:17 pm
by Luke
Not a real big deal, but in Opera, the body background still shows up even if i change it or make it not have a background in the print css file. If anybody knows why... let me know. THX