I want to create image avatar like avatar contact of skype,can you help me ?, I try use border radius-border
but lucky
Asked
Active
Viewed 2,029 times
-4

jbutler483
- 24,074
- 9
- 92
- 145

pasedol
- 7
- 1
-
1I don't understand your question. Can you add a sketch of what you want? And please add the code that you've tried so far. Please note that the correct syntax is `border-radius`. – GreyRoofPigeon May 05 '15 at 08:07
-
it's not radius-border is `border-radius` – Luís P. A. May 05 '15 at 08:08
-
2Do you mean this? [**See demo here**](http://jsfiddle.net/8u4koa1s/). – Ruddy May 05 '15 at 08:11
-
you may want to read up on [Draw Circle using css alone](http://stackoverflow.com/questions/6936972/draw-circle-using-css-alone) – jbutler483 May 05 '15 at 08:22
3 Answers
2
I think you can use border-radius
on img
tags, too.
img{
border-radius: 50%;
}
<img src="https://c2.staticflickr.com/4/3016/3071708735_ddaf5d361b.jpg" alt="">

bbosternak
- 357
- 4
- 14
0
CSS:
.circleImage {
width: 300px;
height: 300px;
border-radius: 50%;
background: green;
}
HTML:
<div class="circleImage"></div>
Keep the border radius half of the width or height for circular images like in Skype.

Kurenai Kunai
- 1,842
- 2
- 12
- 22
-
or just use 50% as your declaration. Please also note, the border radius property no longer requires prefixing. :) – jbutler483 May 05 '15 at 08:26
-
-
Removed the prefixes and also made it 50%. :) Thank you for suggestions. – Kurenai Kunai May 05 '15 at 09:28