2018-10-12 15:37:13 -04:00
|
|
|
---
|
|
|
|
title: Make Circular Images with a border-radius
|
|
|
|
---
|
2019-07-24 00:59:27 -07:00
|
|
|
# Make Circular Images with a border-radius
|
2018-10-12 15:37:13 -04:00
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
---
|
|
|
|
## Problem Explanation
|
2018-10-31 22:56:51 +04:00
|
|
|
We need to give our cat photo a ```border-radius``` of ```50%```.
|
2018-10-12 15:37:13 -04:00
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
|
|
|
|
---
|
|
|
|
## Solutions
|
|
|
|
|
|
|
|
<details><summary>Solution 1 (Click to Show/Hide)</summary>
|
2018-10-12 15:37:13 -04:00
|
|
|
|
2018-10-31 22:56:51 +04:00
|
|
|
In class ```smaller-image``` add a ```border-radius``` of ```50%```:
|
|
|
|
|
|
|
|
```css
|
|
|
|
.smaller-image {
|
|
|
|
width: 100px;
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
This class already assigned to our ```img``` element and making it perfectly circular.
|
2019-07-24 00:59:27 -07:00
|
|
|
|
|
|
|
</details>
|