A commenter recently noted that it was difficult to print the Programmer's Bill of Rights post. And he's right. It's high time I set up a print stylesheet for this website. I added the following link tag to the page header:
In Firefox you can use the Web Developer extension to switch stylesheets. However, I have found that it produces kinda weird results⌠it doesnât use the right font, for example.
In my (limited) experience, for print youâre better off defining your width in âphysicalâ units - like inches or centimeters. And leave enough lee-way for different browserâs default margins. Iâve had problems with 100% divs printing with the right part of the text âeatenâ by the margin.
So how do you set/change the font size for print? Some of the time I will need large print, other times not, so it would be useful to be able to do this flexibly. Thank you.
I was slashdotted once and installed an austere style to reduce bandwidth load. I found it was a much better site for Treos after that. And in some ways, it was a much better site in general
Ole, did the style sheet really affect how browsers downloaded your page? I was always under the impression that the style sheet was basically applied after the rest of the page was downloaded (otherwise how would it know the element ids and classes?)
I believe, that since the CSS is loaded in the head of the HTML, it is then loaded into memory. There it is referenced by the HTML when the page loads, producing the visual effects specified.
Mobile style sheets are great when they work, however you still run into issues where mobile devices donât handle them properly.
I was building a mobile style sheet of a website that needed to be viewed primarily on Blackberries. Turns out I had to create a different set of pages because the Blackberry supported handheld style sheets, but didnât know how to handle the display: none; which is really the most important part.
I hope they fixed this now so I can go back to just using the good CSS to make the web mobile friendly.
Also, a neat trick for print style sheets is to include a high res graphic for the print header. You can hide it in the default screen style sheet, but display it in the print style sheet.
A sort-of related issue: the font on your page looks like crap with ClearType turned off. Maybe you could create a CSS sheet for those of us who prefer not to anti-alias smaller text.
Could I have a different font set than everybody else?