I wanted to ask if it’s possible to make a circle with pivot in center in CSS because I;m making a resizable circle and when I make it normally than it doesn’t working properly. I’m using jQuery to make the resize smooth but the pivot of the circle isn’t in the middle but instead it’s on the top. So when I call the resize function the circle resizes downwards instead of normally.
Share
To keep the circle in it’s place you need to set the position of the circle (div actually) to absolute and set the left and top of it by yourself. on every resize that you do you need to reset the left and top.
to keep the circle in center of something you can do this:
amount of the with and height are depend on your design but margins should allways be half of the size of the div (navigate)
For resizing the circle I used a range input. and did this jQuery code:
You can clean this code up but it works! look at the example:
http://jsfiddle.net/mohsen/4PHMj/
Update:
Here is more clean code: http://jsfiddle.net/mohsen/4PHMj/7/