0

I assumed there is no difference until I spent hours trying to figure out why my buttons do not align properly.

Originally, I had the following code:

    <div class="col-sm">                          
         <button id="btnRegisterX" type="button" class="btn btn-Orange" data-toggle="modal" data-target="#mdlRegisterX">X</button>    
    </div>

    <div class="col-sm">                                    
         <button id="btnRegisterY" type="button" class="btn btn-Orange " data-toggle="modal" data-target="#mdlRegisterY">Y</button>
    </div>

    <div class="col-sm">                                   
         <button id="btnRegisterZ" type="button" class="btn btn-Orange" data-toggle="modal" data-target="#mdlRegisterZ">Z</button>    
    </div>

The purpose was to have the buttons lined up in one column. That was not the case. They were in separate rows, but no matter how much I tried, the buttons did not line up. However, when I tried the <asp:Button.../> alternative (the exact same attributes in each button, just in that format), everything worked as intended. There was also nothing in the CSS file that contained any alignment attributes for those particular classes.

Any thoughts as to why?

  • There is no such class `.col-sm` in Bootstrap Framework. You need to explicitly define count as well like `.col-sm-4`, `.col-sm-6` etc etc. Check this [Fiddle](https://jsfiddle.net/h62ac4wz/) – Mohammad Usman Jan 16 '17 at 05:40
  • http://stackoverflow.com/questions/6813760/difference-between-aspbutton-and-htmls-button – Falguni Panchal Jan 16 '17 at 05:50
  • Possible duplicate of [Difference between asp:button and html's button](http://stackoverflow.com/questions/6813760/difference-between-aspbutton-and-htmls-button) – Mr. Perfectionist Jan 16 '17 at 08:19

0 Answers0