CSS Rounded corners: 7 lines of code, without any images
ashko.blogspot.com
ashko.blogspot.com
-moz-border-radius-topleft: 0.4em; -webkit-border-top-left-radius: 0.4em; -moz-border-radius-topright: 0.4em; -webkit-border-top-right-radius: 0.4em; -moz-border-radius-bottomleft: 0.4em; -webkit-border-bottom-left-radius: 0.4em; -moz-border-radius-bottomright: 0.4em; -webkit-border-bottom-right-radius: 0.4em;
This doesn't mess up your HTML with divs, and degrades seamlessly to "not rounded corners" in any other browser.
Seven lines of CSS and fifteen of HTML per box is bullshit when you can do the same thing in a standard and semantically better way in the space of a Twitter message. I can hardly believe people still put so much effort into IE-specific workarounds for purely decorative effects.
... but ...
if you're actually writing 15 lines per box, you're doing it wrong.
refactor refactor refactor
Note that if you're using it to make a vertically compact title box, you'll have to do even more CSS funny business. That's because the rounded-corner header is a separate entity from the box below it, so you need to tweak the text to appear above its normal position in the box.
Confession time. Yes, I know because I myself admired YouTube's rounded corners enough to peek at their CSS and implement this technique as well. Hugs, not drugs, kids.
I'm not completely sold that this is easier than image mangement (it probably is for developers who fear graphics work, less so for designers who fear code hackery), but it's awfully clever to my eyes.
Here is a technique I have used before to add a 'snazzy border': http://www.cssplay.co.uk/boxes/snazzy.html
Either way you're going to make a standarista cry.
* No image files (Extra HTTP requests/inflexible to colour changes)
* No extra markup (All the benefits of a clean DOM)
* Cross-browser without relying on parsing bugs (Supporting user choice is good)
* No pixel-based measurements (Visual designs should scale to different browser text sizes and screen resolutions)
Given that, any solution will involve some trade-offs. To me, some non-semantic HTML is a reasonable sacrifice since it is transparent to most users.
If the quality of the implementation weren't bad enough, this method isn't even new.