0

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?

1 Answers1

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