Drew Diller has developed another method for creating rounded corners without using images, The following is from Drew's site (http://www.dillerdesign.com):
element.style assignments and the :hover pseudo-class.
<script src="DD_roundies.js"></script>
<script>
DD_roundies.addRule('.box', 10);
</script>
If you've ever worked on a web app, you've invariable gotten to the point where a client asks for something that doesn't sound difficult, yet, because of the market share of certain browsers (despite their near total lack of technical fitness), the feature that the client is asking for is difficult.
You may explain the situation, and the client may respond logically and remove the request, respond logically and insist that you move forward despite the time sink, or they might plainly give you the look of "This guy is feeding me designer bull-<expletive/>."
A prominent web developer recently experimented with making life easier on this front, and he noted some limitations. I thought his approach was novel - if you can't beat 'em, join 'em - and I got curious about what more experimenting might yield.
Criticism welcome. I don't claim to be a Javascript guru, and I'm surprised this works as well as it does!
The only "new" thing going on here lies within IE. Browsers that implement the border-width CSS property already have what is needed to make round-corner boxes.
What's going on in IE, however, is slightly bonkers:
DD_roundies.addRule() adds a line of CSS to the document via DOM.addRule, which should be a string (such as #content div).style.behavior to no longer have a value; allowing behaviors to continue unchallenged is a recipe of for CPU-eating disaster.element.offsetWidth, element.offsetHeight, and element.currentStyle<DD_roundies:shape/> node is constructed and appended to the element. Yes, element name prefixes are valid in XHTML.z-index:-1.DD_roundies.addRule().addRule takes three arguments: a text string representing a CSS selector (required), an integer representing an intended corner radius (required), and a boolean indicating whether you wish to add styles for standards-compliant browsers (optional).