I added width property to bootstrap buttons. However, it did not make <a class="btn" /> the same width as <button class="btn" />. Here’s the jsFiddle.
This is in Chrome.
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.
Resetting the left and right
paddingto zero helps but leaves the link button 2px wider.This is because chrome’s user agent applies
box-sizing: border-boxtobuttonelements which means thepaddingwill be included in thewidthand not in addition to it.Setting
box-sizing: content-boxin your class fixes this 2px difference as well.See demo.