In a compatible and the most convenient way?
pure css and html? (assuming you don't mean using a images for the corners, or a background-image....)
a number of browsers support rounded borders e.g.
-moz-border-radius
-webkit-border-radius
border-radius
None of these work in IE however
(See Jeff's response here and the comments.)
as of now rounded corners are supported in Firefox and safari through browser extension
rounded corner is a part of CSS3 specification, so if you want to implement a rounded corner using pure CSS and HTML now, it is possible only using browser extensions (-moz-border-radius for Firefox -webkit for safari)
you can also achieve the same using JavaScript plugins
If images are allowed make 4 corners in the graphic program of your choice, make this the background-image of some span/div tags and align them properly via the position:absolute; in a container that is set to position:relative;. If you only want to use CSS you could basically do the same, but instead of choosing a background image every pixel have to be set. In a 5 by 5 corner you approximately need 10-12 tags for this tags. In other words approx 40 per panel which could lead to an 1 (CSS)+1(div/span)K byte overhead for one panel. Although I personally wouldn't take this approach, it is a possible and probably would work in most browsers.
You can use CSS3 rules:
- -khtml-border-radius: 5px; /* for Konqueror (linux browser) */
- -moz-border-radius: 5px; /* for any version of Firefox */
- -webkit-border-radius: 5px; /* for Safari and Google Chrome */
- border-radius: 5px; /* for browsers who support CSS3 */
I used to have pure html and css based rounded corners without images which will work in all the browsers including ie6!. Check the link below which i use for my sites... nifty rounded corners
http://kalsey.com/2003/07/rounded_corners_in_css/
Uses 4 small images though
Rounded text inputs with jQuery and no images: http://www.tonyamoyal.com/blog/2009/06/23/text-inputs-with-rounded-corners-using-jquery-without-image/
Hi I recently had to overcome the same problem, A resizeable widget with rounded corners, inside border, drop shadow and a gradient background. It also has to work on all browsers (IE6 included).
Assuming you are using photoshop and look after your source files properly it is fairly easy. In total it requires 4 images (up to 7 depending on how you support IE6), these can all be sliced from the original photoshop file so its pretty easy.
Check out the link below.
http://thatguynamedandy.com/blog/css-widget-rounded-corner-gradient-drop-shadow