0

I have some images and I want to show them on my webpage. But the problem is that I want to make their corners rounded. The deepness of rounded corner depends, some time I want decent round corners and some time I want very deep round corners so that it appear a circular image.

What is right way to do this?

4 Answers 4

2

You can use following css:

-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;

Note:- This will not work in IE except IE9.

Sign up to request clarification or add additional context in comments.

6 Comments

Actually, IE 9 supports border-radius.
@Emil: Yes it does. but peoples has not started to use IE9 especially with windows XP. Updated answer.
@Harry: IE is very popular , so we can't leave it. have you any other solution (IE compatible).
@jams: for IE use Curvy Corner. It's javascript solution. Also see this discussion: jonraasch.com/blog/css-rounded-corners-in-all-browsers
@Harry:All these are talking about round corners, but what about circular image?
|
2
/* Gecko browsers */
-moz-border-radius: 5px; 
/* Webkit browsers */
-webkit-border-radius: 5px; 
/* W3C syntax - likely to be standard so use for future proofing */
border-radius: 5px;

Use all 3 to ensure the most compatibility. IE7 and IE8 don't support border-radius except IE9. However There are JavaScript hacks, most involve a heap of 1px elements absolutely positioned or use SVG.

1 Comment

IE is very popular , so we can't leave it. have you any other solution (IE compatible).
1

Rounded corners are not supported by some major browsers (ok maybe one major browser which is ... yes IE). The only way to get a cross browser solution is to use a jQuery plugin to round the corners.

Tutorial on rounded corners

Comments

1

Go here

Here automatically generates all browser specific CSS

http://css3generator.com/

or

http://css3please.com/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.