0

is there a way to align circular div around another circular div, as in the image, without defining a fixed position to each element?

<div style="left:50%; margin-left:-125px; width:250px; height:250px; border-radius:125px; background#F00;"></div>

enter image description here

UPDATE:
what about instead going from left to right? I tried using float but it doesn't work as I would like

enter image description here

Joris Schellekens
  • 8,483
  • 2
  • 23
  • 54
Miky
  • 181
  • 1
  • 5
  • 15
  • you would need to set their positions individually - there is no magic css to do it for you. If you used sass, you may be able to come up with some calculation to do it for you, but the output would still be positioning for each element – Pete Apr 08 '19 at 13:32
  • You could set one of them as a parent and position the others relatively to this parent circle. – Jake Apr 08 '19 at 13:33
  • maybe going from left to right would it be possible? see update – Miky Apr 08 '19 at 13:46
  • See [Position resizable circles near each other](https://stackoverflow.com/questions/17661679/position-resizable-circles-near-each-other). – showdev Apr 11 '19 at 16:19

0 Answers0