I've made circles with just CSS using percents as the width, but this obviously doesn't work with height as they become ovals. Is there a pure CSS way of doing this?
Asked
Active
Viewed 957 times
0
-
1can you show what you've tried so far and what code you have? – Martin Apr 08 '16 at 06:53
1 Answers
0
Use this code for the .circle class:
.circle {
position: relative;
border-radius: 50%;
width: 100%;
height: auto;
padding-top: 100%;
background: white;
}
make sure your padding top is the same as your width and make your height auto.

CodeConstruct
- 290
- 3
- 17
-
I should've been more specific and said concentric circles. I ended up using vw units. Codepen: http://codepen.io/anon/pen/NNXYpX – Bradley Topham Jr Apr 08 '16 at 08:27