Pure CSS Text Resizer

👉 Whoa! Please note that this post is 15 years old. The views expressed within might have become outdated.

Inspired by comments on Roger Johansson's article about text resizing widgets, I created a text-resizing widget that does not rely on scripting. CSS only!

Check out example 1 and example 2.

These experiments are just for fun and do not work across all browsers. In fact, it only works in a tiny selection of browsers, due to its use of the :target pseudo-selector. Since it's not a very serious bit of code, I only tested in Firefox.

It was nice to see it can be done though, even if the markup is far from ideal.