Well behaved rounded corners
Throwing together Ben Nolan’s great Behaviour lib and Alessandro Fulciniti’s DomCorners:
And with the help of Behaviour, every div with class rounded will - you guessed it - get rounded corners.
- styles.css - basic styles
- domCorners.js - slightly modified version of Alessandro’s script.
- behaviour.js - Bon Nolan’s Behaviour lib
- ruleset.js - The ruleset from above to be loaded by Behaviour.
Of course there’s not much point in using this approach if you don’t do any other scripting in your page - the nice declarative style of Behaviour probably isn’t worth letting your visitors fetch the additional 8kB of Code just for adding rounded corners. You’d better use the original, very lightweight standalone DomCorners script.