BTreeHugger's Beat

Safe browser-targeting CSS Hacks

After collecting some fairly comprehensive test results across many browser versions, I've managed to find relatively "safe" (future proof and consistent) CSS hacks to target specific modern browsers. They're based on concepts from earlier CSS hacks I've been using for many years which haven't broken yet, or required little effort to fix, and have been tested in dozens of browsers.

Read more »

Mutually-exclusive stylesheets

If you've ever wanted to serve one CSS stylesheet to modern browsers, and a basic one to older browsers, this is possibly the trick for you. Essentially this technique means less futzing around "reversing" rules, and still gives you an easy place to add rules that might as well be common to all browsers.

Read more »

Detecting SVG support in JavaScript

Script-based SVG detection techniques tend to be very fragile or involve VBScript. Here is one technique that worked once upon a time, but hasn't been updated in a long time. I aim to update this at some point, but here it is for posterity.

Read more »

Using SQL arrays for efficiency

Here is the situation. You have a database of items. Each item has a frequency count. For each item you want to count the number which have the same frequency, lower frequency, and higher frequency.

Read more »