Skip to content
Loading
    
  • class="col-md-4">    
  • class="btn btn-primary">click me
  •     
  •    
  •  This is if you dont't use bootstrap
    1.   
    2.   
    3.   
    4.   
    5.   
    6. Button Group

        
    7.   
    8. class="btn-group">  
    9.     
    10.     
    11.     
      
  •   
  •   
  •  
  •  
    +1
  • +1
    Thanks Sachin for your response. How to align first button to the left, Second button to center and middle button to the right? Kindly suggest.
     
    Many Thanks
    +1
  • Sachin Singh
    +1
    it is already in that order, please test by copy pasting.
    +1
  • +1
    Actually I tried with Bootstrap code and three buttons are displaying in a single row but all of them are alinged to left with little space in between like below. Do I need to change anything else?
     
     
    Button1        Button2         Button3  
    +1
  • Sachin Singh
    +1
    test another one the one with css  from my code, it may solve your Issue.
    use margin and padding as per your need, how could i help in paddings when i don't know how your layout looks like? 
    +1
  • Harsh Shah
    +1
    Hii,
     
    You can set the first button left, second center, and third button in right using the below code.
     








    1.    

    2.       

    3.          


  •    


  •    






  •  
  • +1
  • Mageshwaran R
    +1
    Hi Pallavi,
    Use HTML Table 
     
    1.  <table>  
    2.       <tr>  
    3.            <td><input type="button" name="button1" id="button1" value="Button1" class="btn btn-primary" onclick="" />td>                    
    4.             <td><input type="button" name="button2" id="button2" value="Button2" class="btn btn-primary" onclick="" />td>  
    5.              <td><input type="button" name="button3" id="button3" value="Button3" class="btn btn-primary" onclick="" />td>   
    6.         tr>  
    7. <tr>  
    8.            <td><input type="button" name="button4" id="button4" value="Button4" class="btn btn-primary" onclick="" />td>                    
    9.             <td><input type="button" name="button5" id="button5" value="Button5" class="btn btn-primary" onclick="" />td>  
    10.              <td><input type="button" name="button6" id="button6" value="Button6" class="btn btn-primary" onclick="" />td>   
    11.         tr>  
    12.          table>  
    +1