Lunchtime Code
(You can suggest changes to this post.)
Lunchtime Code
This lunchtime over a salad roll I put together code to generate Perl Training Australia Brand Fairy Dust(TM). These are the little squares that appear on our letterhead, course covers, logo, and other corporate branding.
The code allows for variable density and colour saturation, the creation of different sized areas, and various scaling factors. This means that it's very easy to generate some very cool looking special effects. It's good to have a well-behaved logo.
Browser Compatibility
I'm looking at sprucing up the look, feel, and auto-generation of the Perl Training Australia website, hence the fairy-dust generator. The current site uses lots of HTML 4.01 transitional code for layout and formatting, and a splash of CSS to make things look nicer.
The result is a website that works in everything, and even degrades nicely in browsers that don't yet grok tables or stylesheets. However looking at the code makes me feel uncomfortable -- standards are important, and HTML 4.01 Transitional isn't as standard as I would like. Everything could be made much more simple using strict XHTML and CSS. Sure enough, creating a fully standards-compliant mock-up was a quick and simple operation.
Except for the browser compatibility.
MSIE doesn't support fixed positioning. Netscape 4.7 has different ideas about the transparency of coloured div backgrounds. w3m and lynx don't do much with stylsheets at all.
Of people looking at our website, 48% use MSIE 6, 23% use Mozilla, and 6% use MSIE 5.x. I want our site to degrade nicely in MSIE 5.x, as I'm certain some of that 6% are honest-to-goodness paying customers. The question, of course, is how do I test it?
A bit of googling later and I discovered instructions on how to install multiple versions of MSIE on a single Windows install. Don't know if it will work, but I'm giving it a go.
If all tests well, then we can expect to see a prettier, XHTML/CSS Perl Training Australia website in the near future. Auto-generated fairy dust and all.
3 Myths That Block Progress For The Poor
The belief that the world can’t solve extreme poverty and disease isn’t just mistaken. It is harmful. Read more...
This site is ad-free, and all text, style, and code may be re-used under a Creative Commons Attribution 3.0 license. If like what I do, please consider supporting me on Patreon, or donating via Bitcoin (1P9iGHMiQwRrnZuA6USp5PNSuJrEcH411f).