I’m trying to center a span that has display:block; inside a button
it works in Chrome and in IE9 but not in Firefox
Here’s the link to it:
http://jsbin.com/adefom/5/edit
anybody knows how to make this span centered (vertically) in firefox ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just remove the hard-coded height and width on
.btnand give it somepadding.button { margin: 0px; padding: 0px; } /* Firefox button padding fix */ button::-moz-focus-inner { border: 0; padding: 0; } .icon { background-color: black; width: 17px; height: 17px; } .btn { padding: 4px; }The Firefox button padding fix is from here. Thanks to @Rajesh for finding that one.
Demo <– Click!