-4

I want to create image avatar like avatar contact of skype,can you help me ?, I try use border radius-border but lucky

4
  • 1
    I 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. Commented May 5, 2015 at 8:07
  • it's not radius-border is border-radius Commented May 5, 2015 at 8:08
  • 2
    Do you mean this? See demo here. Commented May 5, 2015 at 8:11
  • you may want to read up on Draw Circle using css alone Commented May 5, 2015 at 8:22

3 Answers 3

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="">

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

1 Comment

You are right :), post edited
0

Try like this: Demo

div.avatar {
    border-radius:50%;
    overflow:hidden;
    width:100px;
    height:100px;
    border:1px solid #ccc;
}
div.avatar img {   
    height:100%;
}

HTML:

<div class="avatar">
    <img src="http://www.stockazoo.com/uploads/3/5/4/5/3545172/5579090_orig.jpg" />
</div>

Comments

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.

3 Comments

or just use 50% as your declaration. Please also note, the border radius property no longer requires prefixing. :)
.....will upvote(+1) after the border radius edit ;-)
Removed the prefixes and also made it 50%. :) Thank you for suggestions.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.