info about link
: Javascript Index : PHP : MySQL :
cool corners
: Source : : Explanation : : Example : : Todo : : Feedback :

Why this script

This script can transform those dull square DIVs into nice cool-looking DIVs with round corners.
So, more or less what you can do with the Mozilla CSS property -moz-border-radius, but something that will work in other browsers too.
I know there's already heaps of scripts that can do something like that for you, but all these scripts require a lot of additional HTML code, CSS code and images, which makes it both hard to implement and creates ugly code.
This script is unique in that you only have to add a class-name (that you can pick yourself!) to your DIV, and the script will take care of the rest. No images needed!

What this script can do

  • Transform any DIV with a background color into a DIV with rounded corners in the same color
  • Partially transform any DIV with a background-image into a DIV with rounded corners. Partially, because at this moment it only works for the top of the DIV. I'm working on completing this for the bottom as well.
  • Keep all the CSS properties (width, height, padding, etc.) intact
  • Cross-browser compatible!
  • Do all this without the need of
    1. Images
    2. Additional HTML Code (apart from a class-name)
    3. Addition CSS Code

Usage

All you have to do is create a DIV and give it a certain class-name. This class-name is what you pass to the function that will create the round-corners. That's it! No images needed! No obscure HTML structures needed! Just a classname and you're good to go.
Check out the example.
=[Disclaimer]=     © 2005-2012 Excudo.net