Since less than a month ago I started a slow learning curve on the proper use of CSS (cascading style sheets) , the best way for me to keep track of all the small new things im learning was to create a new section dedicated to CSS. Hopefully by the end of the year (2005) ill be a CSS Guru, so stay tuned. I started with a small tip to disable printing in a browser.
Ok, this is a very simple CSS example, but very usefull, and actually took me a good couple hours of research, I was in the middle of creating an application for a offshore betting site called therx.com , and the owner told me he needed the appliation to disable all printing from the browser, so well, i tested a couple DHTML proposals which failed and ended up using the following few lines of code, which should be added on the <HEAD> of your page <style type="text/css"> @media print { body { display:none } } </style> As simple as that, and it really works, i tested priniting on IE, Firefox and Safari , it will just print a blank page. As always, hope it helps, and stay tuned for the new CSS section, may be worth visiting in a few months! Felipe |