Last active
December 16, 2015 01:59
-
-
Save cobbman/5358784 to your computer and use it in GitHub Desktop.
jQuery: auto-center an element (button) within it's parent div
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that the above measurements consider the padding on the element. If that element's box-sizing methods change (i.e. in CSS box-sizing: content-box;) it could change which width is used here. Hope that made sense, if not just leave a comment and I'll get back to you.