Hi Carla,
The easiest way to create tabs with rounded corners is to use the CSS3 border-radius property. I covered this in our newsletter (
http://www.elated.com/newsletter/ ) a while back - here's what I wrote:
-----
1. Creating rounded corners with border-radius
Rounded borders around page elements have long been popular amongst web designers, but traditionally they're a pain to create. First you have to create the effect in Photoshop, then you have to slice up multiple background images for each element.
CSS3 promises to end all this hassle with the lovely border-radius property. This lets you create a border with rounded corners, and specify the radius of the corner curves. For example:
.mybox { border: 5px solid red; border-radius: 10px; }
At the time of writing, only Opera 10.5 supports border-radius as-is. Mozilla and WebKit browsers have their own versions (-moz-border-radius and -webkit-border-radius). So to get it to work in Opera, Firefox, Safari and Chrome you need to write:
.mybox { border: 5px solid red; border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; }
Incidentally, you can also specify a radius for each corner individually, although sadly the syntax is completely different for each browser engine. (Can't these people agree on anything!) Here's how to set a rounded border just for the top right corner of an element:
.mybox { border: 5px solid red; border-top-right-radius: 10px; -moz-border-radius-topright: 10px; -webkit-border-top-right-radius: 10px; }
...
4. Getting it all working in IE
So now we come to the elephant in the room: Internet Explorer! How can we use these lovely CSS3 effects in this dear old browser? First of all, the good news is that IE9 will _probably_ support all these properties natively. For older versions, though, we'll need to resort to a bit of JavaScript cunning. Fortunately there's a great script out there that does all the hard work for us:
http://fetchak.com/ie-css3/To use it, download the script and save it in the same folder as your Web page, then add the following property to the same selector(s) that use the CSS3 properties:
behavior: url(ie-css3.htc);
For example, here's how to create fully cross-browser rounded corners that work in Firefox, Safari, Chrome, Opera, and IE 6, 7 and 8:
.mybox { background: #fff; border: 5px solid red; border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; behavior: url(ie-css3.htc); }
Have fun!
--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/